Where is the apk file when using a Custom Test Spec in AWS device farm? - aws-device-farm

I've followed this guide https://docs.aws.amazon.com/devicefarm/latest/developerguide/how-to-create-test-run.html and i'm running a Custom Test Spec (see step 5). Where is the apk that I uploaded in step 3 on the file system so that my Courgette tests can point to them?

Just found the answer in the example test spec: $DEVICEFARM_APP_PATH

Related

Exception calling IAM: There were concurrent policy changes

I get the above error after running mvn -DskipTests package appengine:deploy. Here's the whole error:
Exception calling IAM: There were concurrent policy changes. Please retry the whole read-modify-write with exponential backoff. The request's ETag '\007\005\364\274\033.\262\307' did not match the current policy's ETag '\007\005\364\274\033\177\220\315'.
From my reading, this occurs when there multiple policy changes at the same time. The other questions I've seen throw this error in regard to a POST request but this is to do with an appengine:deploy
What IAM policy does the service account need to work?
This is the IAM account that I believe was created by the appengine:deploy process and it's permissions:
Note - I don't think it's applicable but I added this deploy to appengine step to a Spring Boot app speakiong to a Postgres db.
EDIT
As mentioned in the comment, #Robina's answer has moved me along but not the logs show this error:
UnsupportedClassVersionError: org/springframework/boot/loader/JarLauncher has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtome only recognizes class file version up to 55.0
But setting the java version to 17 throws a build error; here's my appengine.yaml:
runtime: java11
instance_class: F1
EDIT 2
I came across this while reading through the Google guide here which said:
Deploying an executable JAR
Use any build framework to build an executable JAR locally, then do one of the following depending on whether you created an app.yaml file for your app:
If you created an app.yaml file:
Copy the file into the same directory as the executable JAR file you created.
From the directory that contains the app.yaml and your JAR, enter the following command:
gcloud app deploy
gcloud app deploy will create an app.yaml file that contains the
minimum settings, using all default values.
I thought, why not? So I deleted the appengine folder and its app.yaml and then ran the command from above, minus the jar:
gcloud app deploy
After, probably 10 minutes of the command running the app was deployed and points to the Postgres database without any problems. Thanks #Robina for the help!
The service account must have the App Engine Deployer role in order to deploy an application to App Engine. The IAM policy needed for the service account to function depends on what it is used for. Your application is probably being deployed to Google App Engine using the service account if you are using appengine:deploy.
A gcloud command example for granting the role:
gcloud projects add-iam-policy-binding [PROJECT_ID] --member=serviceAccount:[SERVICE_ACCOUNT_EMAIL] --role=roles/appengine.deployer
[PROJECT ID] and [SERVICE ACCOUNT EMAIL] should be changed to reflect your project ID and service account email, respectively.

ERROR: (gcloud.app.deploy) Error Response: [9] Flex operation projects/.../regions/us-central1/operations/... error [FAILED_PRECONDITION]

I'm pretty new on Google Cloud, and I just wanted to deploy my first streamlit webapp. I'm on Windows in command line. I already did the Google Cloud "Hello World" Example, which worked without any error.
When I deploy the streamlit webapp, I got after 3-4 minutes waiting "Updating Server" the following error:
ERROR: (gcloud.app.deploy) Error Response: [9] Flex operation projects/XXXX/regions/us-central1/operations/f0c89d22-2d09-410d-bf99-fc49ad337800 error [FAILED_PRECONDITION]: An internal error occurred while processing task /app-engine-flex/flex_await_healthy/flex_await_healthy>2021-05-27T06:13:50.278Z10796.jc.0: 2021-05-27 06:15:32.787 An update to the [server] config option section was detected. To have these changes be reflected, please restart streamlit.
That's my app.yaml file:
service: default
runtime: custom
env: flex
manual_scaling:
instances: 1
resources:
cpu: 1
memory_gb: 0.5
disk_size_gb: 10
Posting my comment as an answer for better visibility and to summarize.
In this particular case, the error was caused by a mistake in the Dockerfile.
Here are some steps you can follow to fix or narrow down the error:
Try to deploy a test app to see the differences in configuration. Example.
Try deploying your app after updating the gcloud with gcloud components update command.
Make sure you run the SDK as an Admin.
If the error recurs, run the gcloud app deploy app.yaml --verbosity=debug to try getting more specified error.
It's good practice to include references in questions for folks who aren't familiar with e.g. Streamlit. I assume it's this: https://streamlit.io/
I suspect (!) that Streamlit does not (by default) satisfy App Engine's requirements:
A web app on port 8080
No additional (apt get) dependencies
No C-based dependencies
The Streamlit wiki references various deployment alternatives and includes Google Kubernetes Engine (aka GKE) (see below) but not App Engine.
This doesn't mean that it won't work on App Engine (standard) just that it may not be trivial.
The GKE instructions reference installing Cython an optimizing c-compiler and that gives me pause about using App Engine standard. Unless you're familiar with Kubernetes, I'd discourage you from trying GKE as there's more complexity.
So, it would be helpful if others with experience with Streamlit weigh in but, until then, you may wish to consider using Streamlit sharing.
It would be helpful if someone who has deployed Streamlit to App Engine (flexible?) or perhaps Cloud Run can provide an overview.

We are deploying Open Loyalty on to Google Cloud and we are receiving a Yarn error?

We are installing Open Loyalty Program on to the Google Cloud. Please Google Open Loyalty by Divante Ltd.
We have been trying to deploy this application on google cloud using Kubernetes.
The instance used to deploy this application contains Debian v4.9 as its OS. And we installed Docker, GCloud, Kubernetes and Kompose as the tools for deployment. We built two docker images for the frontend and backend and linked them to the docker-compose file. Now in frontend image, we used (node:5) image from docker hub in Dockerfile of the frontend.
We also changed the docker-compose file as seen below:
enter image description here
After changing the docker-compose file, we ran “kompose up” within the same directory.
which created the deployment and service ‘yaml’ file and then proceeded to run it.
We have pods as given below, but the frontend pod shows some error and some logs.enter image description here
It says yarn not found. When we execute the same process on a local machine, it works as expected.
We are also trying to seek help from Google Support but your help and suggestions will also be highly appreciated.
Yarn is available from node:6. Your front-end image is too old.

Service Fabric Test-ServiceFabricApplicationPackage powershell crash

After upgrade to sdk 2.5.216 and runtime 5.5.216 Test-ServiceFabricApplicationPackage command works only for complete package. In case of partial app upgrade (some Pkg are removed) it results in "Windows PowerShell has stopped working". I have tested on several computers and several apps. to reproduce:
create test app with 2 services and deploy.
change app version and particular service version.
create package and remove Pkg folder from it for the service without modifications.
connect to Service Fabric and test like Test-ServiceFabricApplicationPackage -ApplicationPackagePath "..path" -ImageStoreConnectionString "fabric:ImageStore"
Maybe somebody was able to overcome this issue? or at least has similar behavior so I'm not alone in Universe.
Thanks!
Alex
Take a look at https://github.com/Azure/service-fabric-issues/issues/259
This is a bug in our code. It happens when a compressed package was uploaded and provisioned in the cluster. Testing a new version of the application fails because settings file was not found in the provisioned version.
We fixed the issue and it will become available in one of our next releases.
Meanwhile, you can skip compression or test the version 2 application package without passing in the image store connection string.
Apologies for the inconvenience!

AWS EB deployment - where is my app?

I packaged my Scala/LiftWeb app with the sbt one-jar plugin into a single executable jar file and packed it up with Docker, exposing the embedded Jetty's port in the Dockerfile.
It runs fine locally on Docker and appearently deploys clean on AWS EB using the CLI deployment tools. On the received EB URL however, all I see is the congrats page saying "Your Docker Container is now running in Elastic Beanstalk on your own dedicated environment in the AWS Cloud.".
So, where is my app? Do I miss any steps making my app publicly available on my EB instance?
For future reference, the problem was caused by using an obsolete 2.x version of the aws-eb-cli tools package. Upgrading it to 3.x made the error obvious - building the docker image has failed on AWS.
What I was looking for was running an existing docker image, I found instruction for this scenario at https://aws.amazon.com/blogs/aws/aws-elastic-beanstalk-for-docker/.
Thanks a lot for Nick for asking the right questions which made me realize the obsolete tools package!