Deploy an Ubuntu or Debian Amazon Web Services server with user data and an attached cloud account

This guide provides the information you need to deploy an Ubuntu or Debian Amazon Web Services cloud server with systemd to your Advanced Server Access team. Depending on your target server and enrollment type some topics in this guide may not apply to you, such as if your team's project does not have a cloud account added or you plan to add a different server type to your project. Modify these steps as needed to fit your team or refer to another cloud deployment guide.

Creating a cloud server with user data means installing the Advanced Server Access server agent when you create a server with a cloud provider. Using user data to install software on a new cloud server can be done through any cloud provider, though the user data that is used helps dictate the specific software that's needed. For Advanced Server Access, user data is used is to install the Advanced Server Access agent on your cloud server. Installing the Advanced Server Access server agent on a cloud server doesn't need to be done when the cloud server is created, but running the installation as user data alongside a server's creation ensures that your cloud deployment is as safe and secure as possible.

Prerequisites

You need the following permissions and resources to deploy an Amazon Web Services server with user data:

Amazon Web Services

Requirement Description
Amazon Web Services Account An Amazon Web Services account is needed to access the AWS Management console, where you can create a virtual machine for your team.

Advanced Server Access

Requirement Description
Advanced Server Access Team This is the top-level object that is representing an organization within Advanced Server Access.
Advanced Server Access Project This is the authorization-scope of your team, organizing your users, groups, and servers.

Create a server from the Amazon Web Services Management console

  1. Sign in to the Amazon Web Services Management console.
  2. Click the Services tab at the top of the console and select the EC2 option in the Compute category to create a new EC2 Server.
  3. Click Launch Instance.
  4. On the Choose an Amazon Machine Image page, scroll down and select Ubuntu server 16.04 LTS (HVM), SSD Volume Type. Doing this sets your new instance as an Ubuntu/Debian Server with systemd.
  5. On the Choose an Instance Type page, click Next: Configure Instance Details.
  6. Select the Advanced Details box on the Configure Instance Details page to access the User Data field.
  7. Paste the following text into the User data field:

    #!/bin/bash

    echo "deb http://pkg.scaleft.com/deb linux main" | sudo tee -a /etc/apt/sources.list

    curl -C - https://dist.scaleft.com/pki/scaleft_deb_key.asc | sudo apt-key add -

    sudo apt-get update

    sudo apt-get install -y scaleft-server-tools

  8. Click Review and Launch, then click Launch. The Select an existing key pair or create a new key pair dialog box appears.
  9. Select the Proceed without a key pair option from the drop-down box.
  10. Confirm and acknowledge your choice by selecting the relevant check box, then click Launch Instances.
  11. Click View Instances. You should see the new server being initialized on the Instances page.

Enroll your server in Advanced Server Access by attaching your cloud account

  1. In the Amazon Web Services management console, select the dropdown next to your profile name at the top of the page and click My Account.
  2. Copy your account ID number under Account Settings.
  3. Navigate to your team's dashboard within the Advanced Server Access console.

  4. Click the Projects header at the top of the console and select a project for your server.
  5. Click the Enrollment tab within your project's console.
  6. Click Add Cloud Account.
  7. Paste your Amazon Web Services account ID number in the Account ID field, and add a description if needed.
  8. Click Submit.
  9. Navigate to the Servers tab and confirm that your new server is listed.

Confirm that your new servers are listed in the Server tab of your Advanced Server Access project before you attempt to connect to them.

Next steps