Quickstart

Getting your app into AWS has never been easier! With just a few commands, you can have your application live in no time.

If you are looking for more ways to customize your infrastructure before deploying, check out our more detailed documentation here first.

  1. TL;DR
  2. Step-by-Step
    1. Prerequisites
    2. Installation
    3. Store a DragonOps Api Key
    4. Initialize your account
    5. Deploy your base infrastructure
      1. Status/Logs
    6. Deploy your first application
      1. Status/Logs
      2. Get it live!
      3. Application logs (server/job applications only)

TL;DR

  1. Create an account and subscribe to a billing plan.
  2. Create an API Key and save the client_id and client_secret (in the format client_id:client_secret).
  3. Click on Initialize from your home dashboard and follow the steps in AWS when redirected.
  4. Install the DragonOps cli (brew tap DragonOps-io/tap && brew install DragonOps-io/tap/dragonops).
  5. Run dragonops group add and then dragonops group apply -f <group-name>.yml (wait for completion before moving on - check status with dragonops group status <group-name>).
  6. Run dragonops app add (from a git repository with a remote origin configured), and then dragonops app apply -f <app_name>.yml (wait for completion before moving on - check status with dragonops app status <app-name> --all)
  7. Commit and push your changes to your main git branch when ready (or customize your CI/CD if you prefer). This will kick off a deployment to the dev_environment automatically.
  8. Find your application endpoint with dragonps endpoint list to view it live!

Step-by-Step

If you’re unsure about any of the steps, just reach out to your DragonOps rep! We are always happy to help!

Prerequisites

The only things you need to get started are:

  • An AWS Account and a user with admin permissions

For detailed instructions on the steps above, head over to prerequisites

Installation

The DragonOps cli is supported on both linux and macOS. Installation is simple and handled through the popular homebrew package manager.

  1. Make sure homebrew is installed.
  2. Run the below commands:
    brew tap DragonOps-io/tap
    brew install DragonOps-io/tap/dragonops
    
  3. Verify the installation was successful by running:
    dragonops version
    

Store a DragonOps Api Key

In order to use any of the commands with the dragonops cli, you’ll need a DragonOps Api Key. If you don’t have one already, you can generate one here.

You will be prompted for this key when you run your first command, and every other command. To avoid the prompt, you can store it in a .doconfig file in your home directory in the below format:

# ~/.doconfig

api_key = client_id:client_secret

Initialize your account

The init command is the first step to getting your account set up. This command will bootstrap your AWS account with all the resources necessary for DragonOps to manage your infrastructure and deploy your applications.

You can perform the initialization process from your dashboard or from your terminal. If you have already initialized your account from your dashboard, you can skip this step.

Simply run the below command, follow the prompts and instructions, and you’re good to go!

dragonops init

For more information on exactly what gets created with init, refer to our documentation here

Deploy your base infrastructure

The group add command is used to generate a dragonops configuration file which will be used to deploy the base infrastructure needed to host your applications. It assumes reasonable defaults for naming and configuration, but you can customize the resources in your config file to your liking after generation.

Run the below command and follow the prompts.

dragonops group add

Next, you’ll need to run the group apply command, which is used to deploy the resources defined in your config file.

dragonops group apply -f <group_name>.yml

For more information on the group add and group apply commands and what it provisions, check out our documentation here

Status/Logs

Because jobs are asynchronous, you can check the status of your group infrastructure deployment with the status command:

dragonops group status <group-name>

Logs from the deployment are also available with:

dragonops deployment logs --group <group-name>

Note: If you don’t see any logs, that’s okay! There can be a slight delay in logs being available, so give it a couple of minutes and try again.

Deploy your first application

Once your group has finished applying you are ready to deploy your first application! The app add command is used to generate an application config file. The app add command assumes reasonable defaults for naming and configuration, but after generation you can always customize it more.

You will need to run the command from a git repository with a remote origin configured.

We support both GitHub and GitLab!

Run the below command and follow the prompts.

dragonops app add

Next, run the app apply command to deploy the infrastructure in your config file.

dragonops app apply -f <app_name>.yml

Status/Logs

Because jobs are asynchronous, you can check the status of your deployment with the status command:

dragonops app status <app-name>

Logs from the deployment are also available with:

dragonops deployment logs --app <app-name>

Note: If you don’t see any logs, that’s okay! There can be a slight delay in logs being available, so give it a couple of minutes and try again.

Get it live!

After the status for your application is APPILED, you can finish up the process to get it live by utilizing the DragonOps-generated CI/CD. If you don’t want to use our CI/CD, you can customize or make your own as well!

To use the DragonOps-generated CI/CD files, you will be prompted to perform some actions regarding CI/CD in the terminal. We have provided the same instructions below as well.

Instructions for server/job applications
  1. Checkout a new branch, add your files, commit and push (checkout our docs for an example of these commands).
  2. Get your app live by pushing the generated files to the main or master branch.
  3. (Optional) If you are using customized environments, you will need to update the generated CI files to reflect your build commands and environment names.
  4. Checkout a new branch, add your files, commit, and push.
    • git checkout -b dragonops
    • git add .
    • git commit -m "dragonops cicd and app config file"
    • git push origin dragonops
  5. Open a PR (optional). Merge in your dragonops branch to your main/master branch. This will kick off a build to your dev environment.
Instructions for static applications
  1. Navigate to the .github/workflows directory DragonOps created for you.
  2. In each generated.ENVIRONMENT.yml file, you will need to update the CLOUDFRONT_DISTRO_ID value. (You can get this from the dragonops endpoint list command once your app has an APPLIED status).
  3. In the build-and-deploy.yml file, look for the BuildAndDeploy step. You will need to add your build commands here, as well as update the directory your tool builds static files to.
  4. Checkout a new branch, add your files, commit, and push.
    • git checkout -b dragonops
    • git add .
    • git commit -m "dragonops cicd and app config file"
    • git push origin dragonops
  5. Open a PR (optional). Merge in your dragonops branch to your main/master branch. This will kick off a build to your dev environment.

Note: For applications of type server or job, if your application utilizes a custom build command, flags, or arguments, you might need to adjust the files generated for CI/CD. Additionally, if you chose a group name other than preprod or an environments other than dev and stage, you will need to adjust the generated CI/CD files to reflect that. For more information on DragonOps CI/CD, see the docs here.

You can also deploy your artifacts manually for all application types if you prefer! Check out our docs here for detailed instructions. We suggest some familiarity with the aws cli and (for server and job application types) docker.

Lastly, after you have deployed your infrastructure and built and pushed your application artifact(s), you are ready to view your app live. If you deployed a server or static app, you will have an endpoint where you can verify functionality.

dragonops endpoint list

Application logs (server/job applications only)

If you’ve deployed your application and are seeing unexpected errors (such as 5XXs) when you visit the endpoint (server apps) or your jobs are not completing (job apps) you can view your application logs in the DragonOps configured observability stack.