This repo will introduce you to the basic concepts and tools you'll need to deploy apps with Nuon. It contains a simple example app, and will walk you through the process of building and deploying it to multiple installs.
First, create a fork of this repo. If you have a Github org with other apps you'd like to deploy with Nuon, you should create the fork in that org.
Then, sign up for an account, create a Nuon org, and connect to your Github through our Dashboard. That will provide you with an auth token and org ID. Set those as env vars for the TF provider and the CLI:
export NUON_API_TOKEN={{ your_auth_token }}
export NUON_ORG_ID={{ your_org_id }}
The Terraform config for creating the example app is in the /nuon
directory. If you take a look, you'll see the app, some components, and some basic configuration to wire everything up. To create this app in your Nuon org, follow these steps:
- Run
./scripts/install-tf-provider.sh
, to download and install the Terraform provider. - Remove the
.example
from/nuon/terraform.tfvars.example
, and update the repo name to match your fork. - In the
/nuon
directory, runterraform init
. - Run
terraform plan
to verify it's ready to go. - Run
terraform apply
to create the app.
An install is a sandbox, with an instance of your app running in it. A sandbox defines the environment your app runs in. Currently, we have a pre-built sandbox that provides a VPC, an EKS cluster, and a Route53 zone.
You don't need to own the AWS account you want to install to. Nuon just needs an IAM role with the requisite permissions to create a sandbox. You'll then be able to deploy your app to that sandbox, and will have a running install.
For the purposes of this quickstart, let's create an install in an AWS account that you own:
- Sign into whatever AWS account you want to create the install in.
- Apply the Terraform config in
/bootstrap
. This will create a role an policy with the permissions to create provision a sandbox. - Once the role is created, copy it's ARN.
- Uncomment the
nuon_install
resource in./nuon/installs.tf
, and paste the ARN there. - Run
terraform plan
to verify it's ready to go. - Run
terraform apply
to create the install. It will take 15-20 minutes to fully provision the sandbox.
For this quickstart, you can create as many installs as you'd like. Having more than one will give you a fuller picture of what Nuon does. To create an install in someone else's account, give them the "Create Install IAM Role" link from the Dashboard.
Once you've created an app and at least one install, you can build and deploy that app's components. For each component:
- Run
./scripts/install-cli.sh
, to download and install our CLI. - Run
nuon build --component_id={{your_component_id}}
. This will create a build and return it's ID. - Run
nuon deploy --build_id={{your_build_id}} --install_id={{your_install_id}}
. If you have multiple installs and want to deploy to all of them, replace--install-id
with--all
.
Once you've completed this quickstart, you should be ready to start deploying your own apps with Nuon. For more information, check out our documentation.