How to create and use Deployment Targets
Infrastructure Panel at first login
The Infrastructure panel is shown, with the default initial server.
1. Server Definition
Clicking on any server name in the infrastructure list takes you to the server definition. The basic server definition consists of a Display Name and one or more host names, domain names or IP addresses in the Hostnames field, unless you are using a cloud provider to manage the resources in which case you’ll just see either a logical name here matching the instance name in the cloud provider or the cloud instance IP address.
The Remote Build Store field defines a staging folder on the target host where RapidDeploy will copy deployment packages to when performing deployments. It should be sized according to the number and size of packages deployed.
In RapidDeploy, whenever you want to refer to this logical server definition, you will use its Display Name.
1.1 Creating a Server
You can create a server in two ways.
- The usual way to create a server is from the ‘Add Server Wizard’ button on the Infrastructure panel.
- You can also create a new server whilst defining a Project Target, see 2.1 below for details.
1.2 Transport Tab
The Transport tab lets you define the transport to use to connect to the target host(s) for this definition. At the moment this can be either SSH or Agent.
Enter the values for your SSH or Agent connection on this tab. For SSH these are the standard username, password, keyfile path, passphrase etc that you would use with any SSH connection
1.3 Cloud Tab
The Cloud tab enables you to optionally define a cloud provider and specify cloud instances. You can specify from the dropdown list which cloud provider to use. The elements in the list will depend on which plugins you have installed but will include Amazon Web Services and Microsoft Azure.
The following is for the AWS plugin, but equally applies to other cloud providers.
After you’ve entered your credentials to connect to your cloud account, you can synchronize and you’ll see all of your existing instances in a specific region by selecting that region from the dropdown.
You can choose to link one or more of these instances to this server definition, or you can use the AWS EC2 Instance Creation panel to define one or more instances.
If using a single instance, the IP address of that instance will be automatically updated in the Hostnames filed on the General tab.
1.4 Cloud Automatic Instance Creation
You use the AWS EC2 Instance Creation panel to define one or more instances that will be created and/or started on first deployment, and then managed by RapidDeploy and the cloud provider from then on.
Specify the name to show in the cloud provider using the Instance Name field. You should check, and set if necessary the Hostnames field on the General tab to match the Instance Name you specified here.
If you define more than one instance to start, by increasing the Number of Servers, they will be named in the EC2 console according to the Instance Name with _1 to _n appended to the end.
You should also change the Deployment Settings panel to enable creation of the instance on deployment to “Yes“.
On first deployment the instance(s) will be created, started and then deployed to. On the Transport panel you can also specify if you want any actions performing before the deployment, such as a yum update or Java install.
On subsequent deployments, depending on the settings, RapidDeploy will:
- Check if the server definition exists in the cloud provider account. If not it will be created.
- Check if the instance(s) is/are running. If not, and the “Start Instance On Deployment” flag is set, it will be started.
- The number of instances actually defined will be checked against the number set in the Number of Servers field. Instances will be created/launched to match this number.
1.5 Installations and Projects tabs
The Installations tab shows all the installations on this server. You can also add new installations from this tab.
The Projects tab shows all the projects that currently deploy to this Server
2. Server Installations
Each server can contain one or more installations.
An installation is the definition of something installed on that server. In the image opposite, you can see a server definition with several different installations including Linux, Java, a Java program and two Tomcat installations.
Typically, a project will use its server orchestration to deploy a resource payload to one or more targets (installations on one or more servers).
Therefore a Server Installation, which maps to a Project Target, can be seen as the link between the Project and the Infrastructure that that project deploys to.
For example we might have a project that deploys a Java Application to a number of different servers. In the example in the image, the installation is called javaRunner. We might deploy this to a development, test and production target. In this case it is going to the Tomcat-Dev server, which also has some other components being deployed to it by other projects.
Of course a project could deploy to multiple targets on the same server, so long as each target has a different name. You might want to do this for example if you’re running the same script on a target but you want to pass different parameters or variables to it.
2.1 Creating Server Installations
Server installations can be created from either the infrastructure panel or from the project panel when creating a new target.
- Infrastructure Panel: Identify your server from the list of servers and select the corresponding ‘+’ button on the Action column. Alternatively you can go the Installations tab for the selected Server and click the ‘Add Installation‘ button in the top right hand corner.
- Project Panel: The Server and or Installation can be created automatically when you create a target for one of your projects. You create a new target from the ‘Project’ -> ‘Targets’ tab. In the target creation process, you can select a server or type in the name for a new one, and then select a preexisting installation on that server or create a new one. You then provide a unique configuration name (which applies to this project only) so that you can deploy multiple configurations to the same installation. Please note that if you create a Server this way, you’ll need to go to the Infrastructure pages to configure it later.