Practical OneOps
上QQ阅读APP看书,第一时间看更新

Adding services under your cloud

Now that you have a general idea of what services are and what they do, let's add some services to your cloud. Click on your cloud and click on Add Service. You will be given a drop-down box with options to add various types of services. Let's start by adding an AWS compute service.

Adding a compute service

Select the region you want to add. Currently supported regions are US-East-1, US-West-1, and US-West-2. The minimal configuration you will have to provide is Access Key* and Secret Key*, as follows:

To get the access key, go to your AWS console and select IAM (short for Identity Access Management). It is recommended that you create a new user and then generate new credentials for it. You get to access these credentials only once, however, you do get the option to download them. It is highly recommended that you download these credentials, as you will be using these credentials in various places. It is also recommended that you keep these credentials in a very secure place as they, depending on the accesses granted, will allow the user access to various AWS services via the AWS API.

If you are adding a Rackspace compute service, then your tenant name and username are your Rackspace username and your password is your Rackspace password. For the OpenStack compute engine, Nova, tenant name is also the same as your username and a password is required for the username. You also need to know the API endpoint for NOVA.

Adding Azure compute (or any) services is a bit involved. Firstly, you must have an Azure account. Once you have an Azure account, you will need to sign in to the Azure portal and add Azure Active Directory Service. Once you add Active Directory to your Azure Account, click on Application and add your OneOps application. Azure will ask you to add App ID and App URL. The App URL has to be a valid OneOps installation URL, although it can be on your intranet. Once you click on Configure, you will see all the details that you will need to add to OneOps screen. You will see the client ID, and you will also be able to generate the secret keys.

To get your Azure Subscription ID, click on subscriptions on the left-hand side menu and select the subscription you are using. You will see your subscription IDs listed on the right.

Adding a DNS service

To add a DNS service, you should have an account with either one or all of the major cloud providers, or have a cloud installation of your own such, as OpenStack. The keys you have used so far are the same for AWS, Azure, and OpenStack, with the exception of Rackspace. Rackspace is also the easiest DNS service to configure. So, if you are testing the Vagrant installation or the AWS AMI, then you can try it out with the Rackspace DNS (which is free), along with a free domain name provider. Go ahead and add Rackspace DNS to your cloud with the relevant details:

Just for Rackspace DNS, instead of password, OneOps will ask you to enter an API Key. You will find the API key in Rackspace settings. Click on Show and it will show you the API key. Copy and paste the API key. On the Rackspace side, make sure that you click on Networking and then DNS, and add your Domain Name record. If you are using Amazon Route 53, adding it is the same as adding the EC2 compute. Just make sure that, on the Amazon side, either you buy a domain or, if you are managing an existing domain, you create an appropriate hosted zone. You will also be asked to provide a zone and a cloud ID. Choose an ID appropriate for a zone, which can be a unique string or a geographical ID. For the cloud ID, use a unique identifying string.

Adding a GDNS service

Adding a GDNS service is pretty much the same as adding a DNS service. You will be asked pretty much the same value from the same vendors. Even for zones and cloud ID, you can choose the same values, unless you are deploying in production. In this case, you will want to configure different redundancy zones for your DNS.

Note

Once your DNS is configured, it may take as much as 24 hours for the DNS changes to propagate all over the world. Until then, your deployments might fail or give you strange errors.

Adding a storage service

After adding compute and DNS, you may want to add a storage service. However, this is only needed if your cloud is on AWS, and is not compulsory. The steps are the same as adding any service on Amazon and the details you will need to enter are also exactly the same.

Adding load balancer

It is always a good idea to deploy your app behind a load balancer, especially for a web-based app. A load balancer, in conjunction with your GDNS, will ensure that your app is always serving a proper load. This also makes it easy to scale up the app if it experiences a heavy volume and scale it down again once the volume subsides. The steps to add a load balancer are the same as adding other corresponding services from the providers with the exact same details required.

Adding a mirror service

When you install an application such as Apache Webserver, Apache Tomcat, or MySQL, sometimes OneOps downloads them from the Internet. For this reason, OneOps maintains the links to the latest stable versions of these and other software in a service named mirror service. To get access to these links, you need to add a mirror service to the cloud. Although you can customize it and add more locations to it, for now, you can simply leave it as is and use the defaults.

After this, your cloud is ready to receive some deployments.