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.
TL;DR
- Create an account and subscribe to a billing plan.
- Create an API Key and save the client_id and client_secret (in the format
client_id:client_secret
). - Click on
Initialize
from your home dashboard and follow the steps in AWS when redirected. - Install the DragonOps cli (
brew tap DragonOps-io/tap
&&brew install DragonOps-io/tap/dragonops
). - Run
dragonops group add
and thendragonops group apply -f <group-name>.yml
(wait for completion before moving on - check status withdragonops group status <group-name>
). - Run
dragonops app add
(from a git repository with a remote origin configured), and thendragonops app apply -f <app_name>.yml
(wait for completion before moving on - check status withdragonops app status <app-name> --all
) - 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 thedev_environment
automatically. - 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.
- Make sure homebrew is installed.
- Run the below commands:
brew tap DragonOps-io/tap brew install DragonOps-io/tap/dragonops
- 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
- Checkout a new branch, add your files, commit and push (checkout our docs for an example of these commands).
- Get your app live by pushing the generated files to the main or master branch.
- (Optional) If you are using customized environments, you will need to update the generated CI files to reflect your build commands and environment names.
- 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
- Open a PR (optional). Merge in your
dragonops
branch to yourmain
/master
branch. This will kick off a build to your dev environment.
Instructions for static
applications
- Navigate to the .github/workflows directory DragonOps created for you.
- In each
generated.ENVIRONMENT.yml
file, you will need to update the CLOUDFRONT_DISTRO_ID value. (You can get this from thedragonops endpoint list
command once your app has an APPLIED status). - In the
build-and-deploy.yml
file, look for theBuildAndDeploy
step. You will need to add your build commands here, as well as update the directory your tool builds static files to. - 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
- Open a PR (optional). Merge in your
dragonops
branch to yourmain
/master
branch. This will kick off a build to your dev environment.
Note: For applications of type
server
orjob
, 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 thanpreprod
or an environments other thandev
andstage
, 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.