Skip to main content

AWS

In this walk-through, you’re going to automate the deployment of an example application on the AWS cloud using Argonaut. It is aimed at first-time users of Argonaut.

The walk-through assumes that you have and can log into:

  • A GitHub account
  • An AWS account (free or paid)

Let's begin.

1. Create an account

If it’s your first time using Argonaut, you’ll need to sign up for an account. Alternatively, if you already have one, log into your account.

2. Create an organization

Each Argonaut account needs to be associated with one Argonaut organization. To create an organization:

  1. Click on the Settings icon on your top right.
  2. Click on Cloud Connect.
  3. Under Organization Details, type in a name in the Organization Name field.
  4. Click on the Set button.
  5. You should see an Org is set successfully message.

Create your organization

3. Connect your AWS account

On the same Cloud Connect page:

  1. Scroll to the Connect Your Cloud section.
  2. Scroll to the AWS section.
  3. Click on Authorize with IAM.
  4. Log into your AWS account, if you aren’t already logged in.
  5. You’ll be redirected to the AWS CloudFormation's Create stack page.
  6. Note that the Create stack page is already populated with Argonaut-specific parameters.
  7. Click on the Create stack button.
  8. You should now see the new stack’s page on AWS CloudFormation dashboard.
  9. Navigate back to Connections page from your Settings.
  10. Scroll to Connect Your Cloud —> AWS.
  11. Click Refresh.
  12. You should see your newly connect AWS account ID.
  13. Against the AWS account ID, verify that the connection shows as Successful.

Connect to your AWS account

4. Connect your GitHub account

With your AWS account successfully connected, you finally need to connect Argonaut to your GitHub repository.

  1. Click on the Settings icon ⚙ on the top right of the top nav.
  2. Click Version Control on the left pane.
  3. Scroll to GitHub.
  4. Click +.
  5. Click on the GitHub account you’d like to connect with Argonaut. You’ll host your sample application on this account.
  6. Click on Install to install ArgonautBot on your chosen GitHub account.
  7. Enter your password, and click on Confirm Password.
  8. On successfully connecting your GitHub account, you’ll be redirected to the Version Control page that shows your GitHub account.

Connect your GitHub account

5. Create an environment on AWS

  1. Click on Infrastructure in top nav bar.
  2. Click on Environments +.
  3. Choose Amazon Web Services.
  4. Give your environment a name.
  5. Choose your environment’s region. An environment's region can't be changed later.
  6. Click on Create Environment.

Create environment

To check if the environment creation was successful, navigate to the Infrastructure page from the top nav bar pane, and look for your environment's name in the list.

6. Set up automatic deployment on an example application

  1. Fork the Examples repository into your GitHub account - the same account that you’ve connected to in Argonaut. The rest of the steps assume that the name of the forked repository is also Examples.

  2. On your Argonaut dashboard, click on Applications on your left pane.

  3. Click the button Deploy on the top right.

  4. Select Git Source in the Deployment Setup step.

  5. This takes you to the Deployment Details step.

    1. Choose your GitHub account from the dropdown.
    2. Choose the Examplesrepository.
    3. Choose the node-test branch.
    4. Click Next.
  6. You’ll be taken to the Select Runtime step.

    1. Select the Lambda runtime.
    2. Select your test environment from the dropdown.
    3. Fill your App Name as nodejsexample.
    4. Choose the Build Method as node:latest.
    5. Fill the port as 3000.
    6. Fill the Build Context as node-express.
    7. Fill the Install Dependencies Command as npm i.
    8. Fill the Run Command as npm start.
    9. Click Deploy.

    Configure application runtime details

  7. After clicking Deploy, you’ll be taken to the deployment Logs. Your application is now being deployed.

  8. To check if the deployment was complete, look for the Outputssection in your logs.

Deploy output logs

  1. Your left column should look like the above with Key, Description, Value, etc. listed.
  2. Now, go to the Applications page and look for your application nodejsexample.
  3. Scroll right, and click the PREVIEW URL against nodejsexample. This is the URL where your nodejsexample application is being hosted.
  4. You should see PING_PONG displayed on your screen.

You’ve successfully deployed your example application using Argonaut! Let’s test whether your application now automatically gets deployed when you push a code change.

7. Test automatic deployment of your application

You’re now ready to test if your app gets deployed automatically whenever any code change is pushed to it. Let’s make a code change, and view the app again.

  1. Git clone your forked Examplesrepository on your local machine.
  2. Git checkout its node-test branch.
  3. Go to its node-express folder.
  4. Open the index.js file.
  5. Change the string PING_PONG in index.js to TEST_AUTO_DEPLOY.
  6. Push this change to your node-test branch.
  7. Check your application’s deployments on Argonaut dashboard: ApplicationsnodejsexampleDeployments
  8. You’ll see a deployment against your commit ID.
  9. Once the deployment is complete, navigate to your PREVIEW URL again.
  10. You’ll see TEST_AUTO_DEPLOY on your screen.

That’s it!

You just used Argonaut to successfully set up automatic deployment of an example application on every code push. You can now connect your own app with Argonaut to automate its deployment.