Our first blog in the FlexDeploy and Oracle Cloud Series (announced here) is about the IaaS plugin. IaaS is a cloud offering by Oracle which allows customers to treat infrastructure as service / software. The IaaS plugin makes infrastructure provisioning and management into a more manageable and repeatable cycle to  drive business innovation and agility, improve utilization and lower cost of environment resources, and increase productivity. The IaaS plugin has a number of operations focused on provisioning and managing infrastructure.

IaaSOperationsPadded

 Let’s take a look at how the IaaS plugin can provision and tear down infrastructure in the cloud. The first step in creating infrastructure in IaaS is to create JSON files that describe the infrastructure you want to create and check them into your SCM. These JSON files are called orchestration plans. Orchestration plans are Oracle’s best practice for creating storage and compute instances. Read Jim’s blog about the advantages and reasons for creating IaaS instances using Orchestrations if you would like more information on that. You should create two orchestration plans for each instance you want, one for the storage and one for the compute. The storage orchestration plan should never be stopped unless you want the data to be destroyed. Because of this, the IaaS plugin exposes two stop operations, stopOrchestration for stopping only orchestrations without storage, and stopOrchestrationWithStorage, which will stop an orchestration with storage objects. Flexagon recommends using the stopOrchestration operation in your workflows whenever possible to avoid data loss. As a starting point, Flexagon has provided sample storage and compute orchestration plans in the IaaS plugin guide. You will need to change the names of the Security Lists and SSH Keys, but otherwise they should be ready for use.

Now we will set up build, provision, update, and tear down workflows and execute them. If anything fails, we can execute the build and provision workflows multiple times. If an instance is created by the provision, but is in error state and won’t start, the tear down workflow will remove it so that you can try again. At this stage, there is no data to worry about losing.

IaaS workflows

The FlexDeploy lifecycle has two parts, build and deploy. A build typically checks something out of SCM and then either builds or archives it as an artifact that is kept in FlexDeploy, and can be deployed to servers in different environments. The deploy step would usually deploy those artifacts to a server. With the cloud plugins, the build step is similar, but the deploy step is used for provisioning and scaling the infrastructure. 

The variables that drive the deploy, update, and tear down workflows are also shown as well as the configuration of the createComputeOrchestration step. Users can map the variables to project properties or workflow inputs as desired to make the workflows reusable. You can deploy a number of orchestrations and manage them with these 4 workflows.IaaS Step DetailsIaaS Variables

 

Here are some images of the execution logs from running the workflows.

1 -Building the Orchestration Plans

IaaSLogBuildExecution

2 – Provisioning the instances

IaaSLogProvisionExecution

3 – Updating the size of the compute instance

IaaSLogUpdateExecution

4 – Deleting the storage and compute instances

IaaSLogTearDownExecution

Hopefully this blog article has helped you to understand how FlexDeploy can assist in provisioning and managing your IaaS environment by providing a stable platform to create, version, and maintain your Infrastructure. As leaders in the IaaS space, Flexagon would be happy to assist you with questions that you face when provisioning and managing your IaaS environment. The next blog post in the series will focus on the PaaS Cloud – Database Cloud Services and Java Cloud Services plugins.

Karl Henselin

I have an achievement and responsibility-driven personality and will work with integrity to honor God and serve people. I have a moral compass and a vision for the future. I have been coding for 12 years, 3 years at Flexagon. My primary focuses at Flexagon have been development and maintenance of plugins and devops improvements to our internal processes. I consult in a variety of technologies and enjoy learning new things.

More posts by Karl Henselin
    

1 Trackback or Pingback

Leave a Reply

Your email address will not be published. Required fields are marked *