官术网_书友最值得收藏!

Designing an assembly

As mentioned before, an assembly represents your application in its entirety. It has all the information needed to spawn, scale, and monitor your application. This includes the compute instance needed, OS and other software on top of it, the application software, FQDN, security groups, SSH keys, and any other software that needs to be installed as part of the deployment. Click on the assembly link on the left-hand side menu and you will see your current assemblies as follows:

The first column under the assembly name tells you how many platforms or software packages are part of the assembly. In the preceding example, Java has one platform as part of it, which is JDK 1.7. The second column tells you which environments it was transitioned to. The preceding example tells you that Java was transitioned to two environments. The third column is a handy link to operations, from where you view notifications and perform various operations.

Now, let's create a simple assembly to deploy: a simple VM with JDK installed on it that will be deployed on the cloud that we designed earlier. Click on the New Assembly link to start creating a new assembly. Let's call the assembly test-java. Give it a good description, and in the e-mail ID field, provide your e-mail ID. In the future, if and when you turn on monitoring, all alerts will go to this e-mail ID:

Now, there won't be any preexisting designs to choose from. So, simply click on OK. You have just created your first assembly, however, there is nothing inside of it, as it's just an empty box. So, let's fill it with useful information and instructions. Since we want to install JDK on VM, let's select Java from the platforms on the right-hand side. Give it a name, say JDK. Remember that no spaces are allowed. Provide a description and, from the OneOps pack, add Java:

Now, before we see the magic that is OneOps, it helps to reiterate its purpose. OneOps is a multi-cloud management software. Hence, even by the simple act of adding Java to your assembly, OneOps makes some intelligent assumptions about your deployment. These assumptions are of course customizable.

However, out-of-the-box they work well and they are best practices. You will immediately note that, besides Java, OneOps has added a few other things to your assembly. OneOps adds a compute instance, a security group to control access to and from the compute instance, an OS instance on which OneOps will install and customize the software, and lastly, a Fully Qualified Domain Name (FQDN) that will be reachable from anywhere, depending on your configuration:

So, even if you are deploying just a VM with Java on it, it is still a secure VM that is ready to run enterprise-level apps. Now, before we deploy the assembly, let's tweak a few settings. Click on Design on the left-hand menu till you see the preceding diagram. Then, click on the image that says Compute. Change the size of compute from Small to Micro. There is no particular reason for doing this besides to demonstrate how to tweak various settings in various aspects of your assembly. Also, because this is a test assembly, we don't really need a small instance. Micro will do fine and will boot up faster:

Of course, after we deploy the whole assembly, we would also like to SSH to our new VM to verify that the deployment went fine. For this purpose, we will create a user in advance and insert it into our assembly. Again, click on design on the left-hand side and click on the Platform Name (test-java). You will see that all the components are available on the right-hand side and the components that have already been inserted are expanded, with the number of components inserted displayed in a small circle. For example, because we have one computing instance and one OS instance in our assembly, you will see both of them expanded and they will have a small 1 next to them.

Find a component named User and click on the plus sign next to it. This will bring you to the User Add screen. Pick a good username, a home directory, and a default shell. You will also need an SSH key. If you do not have one, it is highly recommended that you create one with ssh-keygen and keep your private key secure. Copy and paste your public key into the authorized key field:

Those are all the changes needed for now. Click on Commit. Commit allows you to save the changes made to the assembly. OneOps also versions all the changes you make with every commit. So, should you make any breaking changes, you always have the option of going back to a previous commit and deploying again, thus undoing any catastrophe. Now your assembly is ready for deployment and we have a cloud all ready to receive deployments. Next, let's create an environment to deploy an assembly.

主站蜘蛛池模板: 赤壁市| 墨脱县| 衢州市| 普兰县| 简阳市| 贡嘎县| 金沙县| 宁德市| 长治市| 营口市| 山阳县| 吉林省| 临沧市| 博爱县| 麦盖提县| 黔西县| 金湖县| 怀柔区| 新泰市| 藁城市| 安吉县| 青海省| 铜鼓县| 思南县| 肇源县| 北海市| 黄山市| 茶陵县| 丹凤县| 丰镇市| 大冶市| 泸水县| 富蕴县| 佛教| 松桃| 谢通门县| 丰台区| 高平市| 曲阳县| 离岛区| 佛山市|