-
Download the Google Cloud CLI.
-
Create or select a Google Cloud Project. Make sure that project has billing enabled (for New Relic employees, reach out to ask-it on Slack). Continue setting up your project by following the Before you begin section of this setup guide.
- The app is already created in the
helloworld
directory, so you can skip the "Write the sample service" section.
- The app is already created in the
-
Set up your environment and YAML files.
cd helloworld cp env.sample .env # Fill out New Relic license key
# from ./helloworld cp skaffold_example.yaml skaffold.yaml # replace GCP_REGION with your region e.g. 'us-east1' # replace GCP_PROJECT_ID with your project id cd resources cp service_example.yaml service.yaml # replace GCP_REGION with your region # replace GCP_PROJECT_ID with your project id
-
Deploy to Cloud Run from source.
# from ./helloworld gcloud run deploy --source .
-
Once you have deployed the app succesfully to GCR, you should be given a service URL.
Service URL: https://helloworld-{project-id}.{region}.run.app
-
Generate traffic on the app and then view the results in NR One.
for run in {1..10}; do curl https://helloworld-{project-id}.{region}.run.app; done
-
Install skaffold. It should come with the Google Cloud CLI, but double check with:
gcloud components update gcloud components install skaffold
-
Fill out environment and YAML variables if you haven't already (see step #3 above).
-
Deploy the app to Google Cloud with skaffold.
# from ./helloworld skaffold dev --port-forward
-
Generate traffic.
for run in {1..10}; do curl http://localhost:8080; done