I have accomplished deploying a java web/worker role using Azure SDK for Eclipse with the help of the following site : http://dotnetslackers.com/articles/net/Developing-a-Hello-World-Java-Application-and-Deploying-it-in-Windows-Azure1.aspx
Are there options to deploy a java web/worker role using REST APIs of Azure.
Thanks in advance
Yes there is.
From this tutorial you've learned how to directly deploy your application (web role) to Windows Azure. The Windows Azure Tools plugin for Eclipse have one more option - create package. If you just create a package you can use it to later deploy it as Cloud Service (that is the web/worker role) via REST API or PowerShell cmdlets.
However the process of using REST API will be a two step process:
You upload your package to an Azure blob storage using the BLOB REST API.
Create a production deployment for your cloud service pointing the correct package URI in the blob. Do this by using the Azure Management REST API - Create Deployment operation;
Note that the REST Management API for Azure is using client certificate for authentication, which you first have to upload via the management portal.
Related
I have a springboot webapp that i want to deploy to Azure. The app is springboot jar. I have been able to use azurewebapp plug in to achieve this but it is using OAUTH2 which limits integrating this deployment method into our CD (bitbucket).
So the more generic question would be how can i deploy my springboot app via bitbucket deployment pipeline?
I looked at sample yaml file from bitbucket and it looks like that it needs these variables
AZURE_APP_ID: $AZURE_APP_ID
AZURE_PASSWORD: $AZURE_PASSWORD
AZURE_TENANT_ID: $AZURE_TENANT_ID
AZURE_RESOURCE_GROUP: $AZURE_RESOURCE_GROUP
AZURE_APP_NAME: $AZURE_APP_NAME
ZIP_FILE: app-$BITBUCKET_BUILD_NUMBER.zip
So where would i get these values from
Azure App ID: I am assuming this is from Azure app service? But i don't see any app-id on my currently deployed app.
Azure Password: is this password for my (admin) account?
Azure Tenant ID: Whats this? where to get it from?
Also, is this correct approach or should i be using some other method? Azure pipeline?
Azure_App_Id, Azure_Password, Azure_Tenant_Id are the key-value pairs you will get after creating the service principal for your application in the Azure.
Brief Explanation:
AZURE_APP_ID is the associated service principal's application Id/Name/URL for login.
AZURE_PASSWORD is the service principal creds
As you mentioned the bitbucket pipeline, this bitbucket official site will helps you how to create service principal for your web app and get the details required for deploying YAML script.
This site extends to Azure CLI site of creating service principal that is focused on Function app deploy script to bitbucket, where you can follow the same steps and replace the function app with web app.
I'm trying to pass Google credentials (without service account json files) to allow my Google Cloud functions to make requests to the Google Cloud Vision Api.
One week ago I created an Java spring app engine project in the flexible container and here I was able to let my code access the Cloud Vision Api and the Cloud firestore without providing service account json files, because they run on the same project on Google cloud.
Now I'm trying to achieve the same in a Node.js project, because I'm splitting up the Java code into multiple cloud functions.
I already created a working version in Java Spring by using the following code. I have also managed to make a connection with Cloud firestore by providing a service account json file, but again not without that.
Version 1 - with service account file - Java
Credentials credentials = ServiceAccountCredentials.fromStream(new FileInputStream("path-to-json-file"));
Version 2 - without service account - Java
This version I need in my Node.js project
ImageAnnotatorSettings imageAnnotatorSettings =
ImageAnnotatorSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(credentials))
.build();
I just want the Google cloud functions that run on the same project to be
automatically authenticated for the Cloud Vision API.
I'm a beginner in context of google-cloud-endpoints and the associated product "google-cloud-app-engine".
I've created a simple google app angine project/application and created an API-Key by using the google cloud platform's console.
To my app-engine's endpoints API definition I've added the annotation
"apiKeyRequired = AnnotationBoolean.TRUE" as stated in
Add API restriction by adding an API key to your app engine application
and my client application which uses the generated endpoints client API was also updated accordingly to send the generated API key for all API requests.
As I would like to test the "API-Key" mechanism locally on my development machine (using a local app-engine environment) before deploying the backend to the cloud, I would like to know, whether it is possible to test the "API-Key"-restrictions locally. I mean, somehow the locally executed app-engine backend app has to be aware of the created API key. Maybe there is a property which I have to provide to my app-engine backend application's POM.xml file...I don't know, whether the google app-engine SDK supports API keys for local testing in context of the "endpoints framework v2" actually. The newley introduced API Management Platform (API-Gateway) can maybe not be "simulated" locally...?!
Thank you so far for your effort!
API key restrictions should work locally. You just need to include GoogleAppEngineControlFilter in your web.xml.
I have restful spring web service running on tomcat server and have mysql database on backend. I deployed war file of my service using aws elastic beanstalk free account yet but I am unable to setup mysql database. Can anyone guide me on this matter ? Secondly, our application has android side code which will call my REST API so is there any other way to do this instead of setting up amazon web services for testing purposes ?
You are going the right way; Android should call REST APIs. These APIs can be implemented in following ways:
As you suggested; use spring on tomcat to expose such apis.
Use API Gateway exposed by AWS. This api gateway can even call lambda expressions in backend which can be written in Java/Python etc.
I will suggest you to go ahead with 1 as u are already aware of spring/tomcat etc. and MOST companies use this only.
For MySQL database you have following options:
Install MySQL on your local EC2 server ( where you have tomcat running ); or on another EC2 server.
You can use MySQL as a service which is RDS. It is expensive but easy to configure.
I've been working on my personal project -- Spring MVC Application which integrates with AWS Cognito. I have created user pool and linked the pool to a federated identity (not using Facebook or Google to authenticate). Since the SDK that Amazon provides is for Android development in Java, CognitoUserPool is asking to add "android.context.Context" as one of the arguments. Is there any way to get context that works on Spring MVC to integrate with AWS Cognito?
You are probably using wrong SDK. Amazon provides SDK for Java and SDK for Android. Make sure, you are using the right one.