Setting Up Nodes Using Amazon Web Services

If you are not familiar with AWS EC2, you may want to read more about the terminology and concepts used in this document. You can also refer to the full documentation for interacting with EC2 from Amazon Web Services.

  1. Choose a region, and an Amazon Machine Image (AMI):
    • Launch the AWS EC2 Launch Wizard.
    • In the header bar, next to your user name, you can change which region you’d like to use. The link provided defaults to EU (Ireland), but change this to another region if you’d prefer.
    • Choose an AMI. You can choose any operating system supported by Flocker with AWS.

Note

If you want to choose a CentOS 7 AMI, you might not find it listed in the provided link.

Use the links below to launch instances using CentOS 7 AMIs (specifically CentOS Linux 7 x86_64 HVM EBS 1602):

  1. Configure the instance:

    Complete each of the steps in the EC2 wizard using the following suggestions (fields not mentioned below can be left with the default configuration):

    • Choose instance type: We recommend at least the m3.large instance size.
    • Configure instance details: You will need to configure a minimum of 2 instances.
    • Add storage: It is important to note that the default storage of an AWS image can be too small to store popular Docker images, so we recommend choosing at least 16 GB for the root device to avoid potential disk space problems.
    • Tag instance: Flocker does not require the instance to be tagged.
    • Configure security group:
      • If you wish to customize the instance’s security settings, make sure to permit SSH access from the administrators machine (for example, your laptop).
      • To enable Flocker agents to communicate with the Flocker control service and for external access to the API, add a custom TCP security rule enabling access to ports 4523-4524.
      • Keep in mind that, quite reasonably, the default security setting comes with firewall disabled on all ports other than SSH port.
      • You can choose to expose these ports but keep in mind the consequences of exposing unsecured services to the Internet.
      • Links between nodes will also use public ports but you can configure the AWS VPC to allow network connections between nodes and disallow them from the Internet.
    • Launch: This opens a prompt for you to either select an existing key pair, or create and download a new key pair.

    Click Launch your instances when you are happy to proceed.

  2. Add the key to your local keychain (download it from the AWS web interface first if necessary):

    mv ~/Downloads/my-instance.pem ~/.ssh/
    chmod 600 ~/.ssh/my-instance.pem
    ssh-add ~/.ssh/my-instance.pem
    
  3. Look up the public DNS name or public IP address of each new instance. Log in as user centos (or the relevant user if you are using another AMI). For example:

    ssh centos@ec2-AA-BB-CC-DD.eu-west-1.compute.amazonaws.com
    
  4. Allow SSH access for the root user on each node, then log out.

    sudo cp .ssh/authorized_keys /root/.ssh/authorized_keys
    
  5. Log back into the instances as user “root” on each node. For example:

    ssh root@ec2-AA-BB-CC-DD.eu-west-1.compute.amazonaws.com
    

Next Step

Return to the installation instructions specific to your operating system to install clusterhq-flocker-node on each node in your cluster:


Installing on CentOS 7 Installing on Ubuntu 16.04 Installing on Ubuntu 14.04

Or, return to the installation menu.