Dialogflow Integration with Twitter - twitter

I have followed the steps given for integrating with Twitter https://github.com/GoogleCloudPlatform/dialogflow-integrations but I am not able to find the server URL

When command gcloud beta run deploy is executed successfully, it will explicitly prompt in the CLI Service URL: https://dialogflow-PLATFORM-xxxxxxxx-xx.x.run.app and this will be the server URL.
In case you missed it in the CLI you can check it in the GCP console:
Open Cloud Run, it will show all available cloud run services
Select the recently deployed Dialogflow service
Click "Details" tab. This tab will contain information including the server URL
These fields are Region,URL, Last revision deployed
Copy value for URL as this is your Service URL.
For testing I deployed a simple helloworld app. Sample deployed service:

Related

Programmatically check if Cloud Run domain mapping has done

I'm developing a service which will have a subdomain for each customer. So far I've set a DNS rule on Google Domains as
* | CNAME | 3600 | ghs.googlehosted.com.
and then I add the mapping for each subdomain in the Cloud Run console. I want to do all this programmatically everytime a new user registers.
The DNS rule will handle automatically any new subdomain, and to map it to the service I'll use the gcloud command:
gcloud beta run domain-mappings create --service frontend --domain sub.domain.com
Now, how can I check when the Cloud Run provisioning has done so that I can notify the customer that the platform is ready to use? I could CRON every minute the command gcloud beta run domain-mappings describe --domain sub.domain.com, parse the JSON output and check if the status has done. It's expensive, but it should work.
The problem is that even if the gcloud cli or the web console mark the provisioning as done, the platform isn't reachable for another 5-10 minutes, resulting in a ERR_CONNECTION_REFUSED error. The service logs show that a request to the subdomain is being made, but somehow it won't serve it.
I ended up using a load balancer as suggested. I followed this doc "Setting up a load balancer with Cloud Run, App Engine, or Cloud Functions", the only different thing is that I provided my own wildcard certificate (thanks to Let's Encrypt and certbox).
Now I can just use the Google Domains' API to instantly create a subdomain.

How to Integrate Dialogflow ES with Twilio SMS

Has anyone worked on how to integrate Twilio with Dialogflow so people can text a number in their phones and get answers from Dialogflow?
I have looked everywhere and no luck.
The documentation I found on the Dialogflow integrations session was not very helpful:
https://github.com/GoogleCloudPlatform/dialogflow-integrations/tree/master/twilio#readme
I was able to do it and integrated my nodejs app that is a custom for Dialogflow with Twilio.
The documentation is a little confusing but these are the steps:
Requirements:
Twilio account
Dialogflow Agent
Create a Service account in GCP with role: Dialogflow Client API, create a key and save json file (If deploying using Cloud Run).
Enable Cloud Build and Cloud Run API
Setup Gcloud command line tool
Getting Started:
Clone and open the repository for Dialogflow Open Source Integrations: https://github.com/GoogleCloudPlatform/dialogflow-integrations.git
Open Twilio’s folder inside dialogflow-integrations with an editor and open the Dockerfile. Change the ENV INTEGRATION=YOUR_INTEGRATION to ENV INTEGRATION=twilio, then open server.js and. update projectId with Dialogflow’s project ID, accountSid, AuthToken, phoneNumber with Twilio’s Account SID and Auth Token and Phone Number.
Purchase a number with Twilio
Run these commands inside dialogflow-integrations folder:
gcloud init
gcloud config set project dialogflow-proj-name
gcloud config get-value project (to make sure the variable is set)
gcloud builds submit --tag http://gcr.io/dialogflow-proj-name/dialogflow-twilio
gcloud beta run deploy --image http://gcr.io/dialogflow-proj-name/dialogflow-twilio --update-env-vars GOOGLE_APPLICATION_CREDENTIALS=key_that_you_downloaded_previously.json --memory 1Gi
Copy the URL provided
Go to Twilio’s portal and in the "Phone Number" section, go to Active Numbers and click on the purchased number. In "Messaging", paste URL by "A message comes in" and HTTP POST box field. Set the drop-down to Webhook and the HTTP method to HTTP POST.

Jenkins in Docker Container and Google Cloud Source Repository - no Credentials visible

I read everything in this post and multiple others but nothing is working... I cannot use Google Credentials to access my git Repo in Google Cloud Platform
I have Jenkins running in a Docker Container in Google Cloud Platform. I have Source Code in a Google Cloud Repository that I want to use for a Build.
On the Google Cloud Platform side I created a Service User, gave the User the following Roles:
Project Worker
Source-Repository Admin
Storageobject creator
ComputeEngine creator
I created the JSON File and downloaded it.
On The Jenkins Side I installed the Google OAuth Credentials and the Google Container Registry Auth Plugin.
I added new Credentials "Google Service Account from private key" and added the json file.
So, if I now want to create a new Job (Freestyle or pipeline does not matter) I see the following:
I see the credentials I created but for the "Google Container Registry". As soon as I add the repository URL, "https://source.developers.google.com/p...." The Drop-down is cleared and all is gone.
I also took a look at the credentials.xml and job file, to see, if I can rewrite there something by myself. The Google Credentials do not have an credentialId like others...
<com.google.jenkins.plugins.credentials.oauth.GoogleRobotPrivateKeyCredentials plugin="google-oauth-plugin#0.6">
<module/>
<projectId>testprojekt</projectId>
<serviceAccountConfig class="com.google.jenkins.plugins.credentials.oauth.JsonServiceAccountConfig">
<jsonKeyFile>/var/jenkins_home/gauth/key8529180263669390055.json</jsonKeyFile>
</serviceAccountConfig>
</com.google.jenkins.plugins.credentials.oauth.GoogleRobotPrivateKeyCredentials>
I'm currently out of ideas... would be happy for any hint.
Thank you!

how to access the application deployed in openshift3 (wildfly server)

I have deployed the application in my local wildfly server and able to access my application through the url (http://127.0.0.1:8080/dhana/.
I have deployed the same application in openshift3 starter (new) and the build & deployment is successful.
It showing me the service url as ( http://dhanabalan-dhana.a3c1.starter-us-west-1.openshiftapps.com), But when I tried to hit this link it shows as below
Looks like server is up and running, Can anyone guide me to access the application?
Do I need to specify any port (8080) here?
Note: ROOT.war is the deployed file

Access Parse Server Dashboard using Bitnami VM

I have used Bitnami VM to deploy Parse Server on Azure but I cannot seem to be able to access Parse Server Dashboard. What URL is it available on? Do I need to open any ports?
Just an update on this. A new version of Parse Server provided by Bitnami is now available in the Azure Marketplace. The new version does include the Dashboard.
Have you been following Bitnami instructions?
It states you can access the dashboard using this URL: http://[server-IP-address]/parse
This means only TCP/80 port needs to be open (on your Network Security Group if you use one or in your VM ACL if you don't).
You have now other (probably easier) options to deploy Parse Server on Azure:
using a dedicated ARM template leveraging Azure services (App Service, DocumentDB, Notification hub, ...).
using Azure App Service with the original Facebook/Parse version with MongoDB.
I've got it. The bitnami guys were kind enough to reply to me for this topic:
You can launch the latest Parse version that ships the Dashboard from https://vmdepot.msopentech.com/Vhd/Show?vhdId=64574&version=66817 It could take some time to be available in the Azure Marketplace
So bottom line, use the image from VM depot and not the one on Azure Marketplace as it is an old one and doesn't include the Dashboard.

Resources