This repo will introduce you to the basic concepts and tools you'll need to deploy apps with Nuon. It contains:
- ./nuon: Terraform for deploying an example app using the Nuon platform.
- ./example: Source code for the components of the example app.
- ./install-roles: The IAM roles you need to provision new installs.
- ./scripts: Utility scripts.
To get started using Nuon, you'll need to sign up for an account, and install our CLI.
- Sing up using our Dashboard.
- A build server and runner will be provisioned for you automatically.
- Connect your Github account.
- Fork and clone this repo.
- Run
./scripts/install-cli.sh
to install our CLI. - Open a terminal, and copy your auth token and org ID from the Dashboard:
export NUON_API_TOKEN={{ your_auth_token }}
export NUON_ORG_ID={{ your_org_id }}
You are now ready to create apps and installs using Nuon. From here on out, everything will happen in the terminal session you set the env vars in.
To create the example app in your Nuon org:
- Navigate to /nuon.
- Remove the
.example
from/nuon/terraform.tfvars.example
, and update the repo name to match your fork. - Run
terraform init
,terraform plan
, andterraform apply
, just as you would for any other Terraform project.
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.
To enable you to provide the best possible experience for your customers, we offer 2 ways to set up that IAM role.
If you have admin access to the AWS account, there's a Terraform project in ./install-roles/terraform you can use.
- Authenticate with whatever AWS account you want to create the install in.
- Navigate to ./install-roles/terraform.
- Run
terraform init
,terraform plan
, andterraform apply
, just as you would for any other Terraform project.
If you do not have admin access to the AWS account, you can share a Cloudformation Quick-Create link with someone who does.
Click here to see an example of how this works. The Cloudformation template used for this can be found in ./install-roles/cloudformation-quickcreate, which you can use to set up your own Quick-Create URL.
Once the IAM role has been created, you can use it to provision a sandbox.
- Navigate to ./nuon.
- Uncomment the
nuon_install
resource in./nuon/installs.tf
, and paste the IAM role's ARN there. - Run
terraform init
,terraform plan
, andterraform apply
, just as you would for any other Terraform project. - 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.
Once you've created an app and at least one install, you can use the CLI to build and release that app's components. For each component:
- Run
nuon builds create -c={component_id}
to create a new build and get it's ID. - Run
nuon releases create -c {component_id} -b {build_id}
to create a new release from your build. This will deploy to all of your installs, 10 at a time.
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.