Deploy a Demo App Tutorial
In this tutorial, you configure your Kubernetes environment for the demo app and then deploy to multiple environments using Armory CD-as-a-Service.
Before you begin
- You have access to a Kubernetes cluster and have installed
kubectl. Your cluster should have at least 4 nodes available for the demo app.
- You have set up your Armory CD-as-a-Service account.
- You have installed the
armoryCLI and Helm.
- You have access to a GitHub account so you can fork the demo project.
1. Fork and clone the repo
Fork and then clone the demo repo to the machine where you installed
kubectl and the
The demo deploys the following:
- A simple microservice called Potato Facts, which has an API for facts about potatoes; Armory engineers created this app for demo purposes only.
- A Potato Facts load balancer
configuration directory is a
setup.sh script that sets up your Kubernetes infrastructure and connects it to Armory CD-as-a-Service.
2. Create credentials
Create a new set of credentials for the demo Remote Network Agents. Name the credentials “demo-app”.
Access the CD-as-a-Service Console.
Go to the Configuration tab.
If you have more than one tenant, make sure you select the desired tenant in the User drop down menu.
In the left navigation menu, select Access Management > Client Credentials.
In the upper right corner, select New Credential.
Create a credential for your RNA. Use a descriptive name for the credential that matches what it is being used for. For example, name the credentials the same as the account name you assigned the target deployment cluster if creating a credential for an Remote Network Agent (RNA).
Set the permission scope to a preconfigured scope group or manually assign permissions. If the credential is for a RNA, select Remote Network Agent from the preconfigured scope group. The group assigns the minimum set of required permissions for a RNA to work:
Removing a preconfigured scope group does not remove the permissions that a preconfigured scope group assigns. You must remove the permissions manually.
Note both the
Client Secret. You need these values when configuring the RNA or any other service that you want to grant access to. Make sure to store the secret somewhere safe. You are not shown the value again.
3. Set up the demo environments in Kubernetes
Make sure you are connected to the Kubernetes cluster you want to install the demo app on.
Log into your Armory CD-as-a-Service environment using the CLI:
armory login --envName "<envName>"
--envName <envNameis optional. Replace
<envName>with the name of your Armory CD-as-a-Service environment if you have access to multiple environments.
Navigate to the
docs-cdaas-demodirectory and run the setup script using the “demo app” credentials you created for this tutorial.
bash configuration/setup.sh <client-ID> <client-secret>
After the script completes successfully, you can view the connected Remote Network Agents on the CD-as-a-Service Console’s Networking > Agents screen.
4. Add Prometheus integration
In the CD-as-a-Service Console, navigate to Configuration > Canary Analysis > Integrations. Add a new Integration with the following information:
- Base URL:
- Remote Network Agent:
- Authentication Type:
5. Deploy the demo app
The deployment file is called
deploy.yml. From the
docs-cdaas-demo directory, run:
armory deploy start -f deploy.yml
Output is similar to:
[2022-04-27T16:24:04-05:00] Deployment ID: 4be2228f-5c46-4574-ad9a-e70e601d94c4 [2022-04-27T16:24:04-05:00] See the deployment status UI: https://console.cloud.armory.io/deployments/pipeline/4be2228f-5c46-4574-ad9a-e70e601d94c4?environmentId=a8906e61-2388-4daa-b38e-4339390b9447
You can check deployment status by accessing the URL included in the output.
prod-eu requires manual approval, so be sure to approve in the UI.
You can run the
destroy.sh script to uninstall Prometheus and the Remote Network Agents. This script also deletes the Kubernetes namespaces created by the
Deployment times out
Because Armory CD-as-a-Service deploys to 100% of nodes on initial deployment, you may run out of space. Increasing the number of nodes should solve the issue.
Was this page helpful?
Thank you for letting us know!
Sorry to hear that. Please tell us how we can improve.
Last modified May 29, 2022: (975089c8)