DocsPipelines for ApplicationsServers
Working with EC2 and GCE servers

GCE and EC2 servers

Sections

Provision a GCE server

Using Pipelines you can provision GCE instances (servers) and have them immediately available for deploys and builds.

Note: Provisioning and launching GCE instances may incur charges on your Google Cloud Account.

For more information on getting started with Amazon and EC2 see https://cloud.google.com/compute/docs/quickstarts.

  1. Click the Servers link at the top of the Pipelines web UI.
  2. Click the Add Server button at the top right.
  3. This will begin the new server workflow.

  4. Click the New Google Compute Instance button.
  5. Enter your Google credentials, if necessary.
  6. Ensure that your connected account has enabled the IAM, Cloud Resource Manager, and Compute Engine APIs before proceeding.

  7. If you just added your EC2 credentials, click Update Credentials.
  8. Select which Project you wish to create the instance in, then click Continue.
  9. Name your Instances, then click Continue.
  10. Names must start with a lowercase letter followed by up to 29 lowercase letters (max length is 30), numbers, or hyphens, and cannot end with a hyphen.

  11. Select Zone, then click Continue.
  12. Select Machine Type, then click Continue.
  13. Select Image Type. Note that you can select an operating system type from the top list, then select the image. When you are ready click Continue.
  14. Select Image
  15. Configure Boot Disk. Here you select the disk type and the disk size, in GB. Then click Continue.
  16. Configure Firewall. Select which protocols you wish to have opened up to this GCE Instance, then click Continue.
  17. Configure SSH Keys.
  18. Here you can enter one or more SSH keys to provide login (ssh) access to the instance. An SSH key is not required, but realize, you can't login to the instance without one.

    SSH Keys
  19. Configure Tags and Startup Script, then click Continue.
  20. Tags n Script
  21. Click Continue when you are ready.
  22. Add Environments. At this step, you can add Pipelines environments to your server. Realize that if the environment is configured to, which it is by default, it will automatically deploy the active release to the server when it comes up. For more information see Environment Settings.
    You do not need to select an environment.
  23. Click Continue when you are ready.
  24. Select Service Account for making Googla Cloud API calls. You may also be prompted to select any Access Scopes. When you are ready click Continue.
  25. Finally select the number of instances you wish to launch, and click Launch.
  26. Your instance(s) are being provisioned.

  27. Click Go to Servers button.

Note: GCE instances take a bit of time to completely provision (come up) and communicate on the internet. Be patient.

Note: If you run into trouble, you can inspect and terminate the instances from the GCE cloud console. console.cloud.google.com/ec2

Provision an EC2 server

Using Pipelines you can provision EC2 instances (servers) and have them immediately available for deploys and builds.

Note: Provisioning and launching EC2 instances may incur charges on your Amazon AWS account.

For more information on getting started with Amazon and EC2 see http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/get-set-up-for-amazon-ec2.html.

  1. Click the Servers link at the top of the Pipelines web UI.
  2. Click the Add Server button at the top right.
  3. This will begin the new server workflow.

  4. Click the New Amazon EC2 Instance button.
  5. Enter your EC2 credentials, if necessary.
  6. For more information on setting up your Amazon Access Key see docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSGettingStartedGuide/AWSCredentials.html.



    Ensure the AWS user has the correct permission policy applied that allows the user to create EC2 instances. If the credentials do not have EC2 permissions you will get an "\"Invalid Credentials"\" error message in Pipelines.

  7. If you just added your EC2 credentials, click Update Credentials.
  8. Select configuration type. Choose New EC2 Configuration.
  9. Select your AWS Region.
  10. The region you select will determine what values are available going forward.

  11. Select your instance type from the list of possible instances. The tabs at top will offer different options.
  12. Select your OS Image.
  13. Select your Virtual Private Cloud (vpc).
  14. Select your Subnet
  15. The EC2 instance you provision must have Internet access. To provision it, ensure your subnet provides an associated public IP address. For more information see docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-ip-addressing.html.

  16. Select your Key Pair. Using key pairs is important for accessing your server with SSH after it is up.
  17. Select your IAM Role.
  18. Select your Security Group(s).
  19. Click Done.
  20. Set any Tags, User Data, and Environments.
    • Tags - allow you to tag the server. For more information see AWS Using Tags. An example tag that will set the EC2 server name is:
    • Name=MyHost001
    • User Data - allows you to specific commands to run when the server first comes up. For more information see AWS User Data. An example might be:
    • #!/bin/bash sudo apt-get -y update sudo apt-get -y install nodejs
    • Environments - allows you to specify which application environments, in Pipelines, to have the server join.
  21. Select the Number of EC2 instances you wish to provision and Launch.
  22. Remember, provisioning EC2 servers may incur charges.

  23. Click Launch.
  24. Your instances are being provisioned.

  25. Click Go to Servers button.

Note: EC2 instances take a bit of time to completely provision (come up) and communicate on the Internet. Be patient.

If you’ve been waiting for longer than 10 minutes, there may be a problem. Are you sure the subnet you chose provides Internet access to the instance?

Note: If you run into trouble, you can inspect and terminate the instances from the EC2 console. console.aws.amazon.com/ec2

Start an EC2 instance

This assumes the EC2 instance has been previously stopped. You can not start a running EC2 instance. It is already started.

  1. Click Servers link from the to[p of the Pipelines web UI.
  2. Find the server you wish to start and click the server link.
  3. This will take you to the server page.
  4. Click the blue gear icon on the right.
  5. Click the Start button.

Note: If the EC2 instance is already started, there will be no start button.

You have started the EC2 instance.

Stop an EC2 instance

This assumes the EC2 instance has been previously started. You can not stop an already stopped EC2 instance.

  1. Click Servers link from the top of the Pipelines web UI.
  2. Find the server you wish to stop and click the server link.
  3. This will take you to the server page.
  4. Click the blue gear icon on the right.
  5. Click the Stop button.

Note: If the EC2 instance is already stopped there will be no stop button.

You have stopped the EC2 instance.

Reboot an EC2 instance

You can reboot only started EC2 instances.

  1. Click Servers link from the to[p of the Pipelines web UI.
  2. Find the server you wish to reboot and click the server link.
  3. This will take you to the server page.
  4. Click the blue gear icon on the right.
  5. Click the Reboot button.

Your server is now rebooting.

Terminate an EC2 instance

You can terminate an EC2 instance. Terminate will completely destroy the EC2 instance.

  1. Click Servers link from the to[p of the Pipelines web UI.
  2. Find the server you wish to terminate and click the server link.
  3. This will take you to the server page.
  4. Click the blue gear icon on the right.
  5. Click the Terminate button.
How helpful was this page?
Puppet sites use proprietary and third-party cookies. By using our sites, you agree to our cookie policy.