One significant advantage of OneOps is its Cloud Agnostic, meaning that the developers and operators can freely move applications that are managed by OneOps from one cloud provider to another, so that they could “shop around” and take the benefit of better technology support, price, capacity, scalability, security, and customer service on demand.
Since the beginning, OneOps started to support many great cloud providers : OpenStack, AWS, Rackspace, Azure….As new cloud provider may emerge and some other cloud providers may be focusing on the markets other than US, it could be useful for OneOps owners to know how to onboard new cloud providers.
In this blog, we will use Alibaba Cloud (a.k.a. Aliyun) as the new cloud. As a background, Alibaba is a Chinese-based internet company that hosts the largest e-commerce websites in China. Aliyun is part of Alibaba and providing the core cloud services oversea that other major players are offering, such as Elastics Compute Service, Storage, Load Balancer, and VPC. For Aliyun China, it almost offers every single “apple-to-apple” service that AWS is offering across all levels of product lines.
These two pull requests collectively add/change the following files:
- cookbook/aliyun/metadata.rb: the configuration parameters of Aliyun ECS
- clouds/aliyun.rb: the custom/default initialization of Aliyun ECS configuration
- add.rb: Aliyun currently does not provide a place to store public key. But if a cloud does support keypair, we suppose to implement something like add_keypair_openstack.rb
Security Group cookbook:
- add_secgroup_aliyun.rb: include fog-aliyun (which is the API to programmatically interact with Aliyun) and handle the creation of a security group.
- del_secgroup_aliyun.rb: deletion of a security group in Aliyun.
- add_node_aliyun.rb: use fog-aliyun to handle the creation of a compute instance.
- del_node_fog.rb: delete a compute, which could handle most providers that are based on the fog API.
OneOps-Admin (request #2):
- shared/recipes/shared_provider.rb: add Aliyun as a shared provider during compute deployment.
- oneops-admin.gemspec: add aliyun-fog gem to the list of gems that will be packaged in oneops-admin.gem
Finally, we may want to sync the newly added cloud to OneOps, and restart the OneOps UI so that it will be picked up and shown in the next run:
bundle exec knife model sync aliyun
bundle exec knife cloud sync aliyun
service display restart
Application Deployment on Aliyun
We could follow one of my previous blogs on creating a new cloud on OneOps. The only different is to use Aliyun, instead of Openstack. In order to deploy something on Aliyun, we may need to spin up an Aliyun account first. The AccessKey and SecretKey are from the Aliyun account and should be pre-configured for authentication on OneOps.
At this moment, Aliyun may only support Aliyun Beijing data center and its availability zones (e.g. cn-beijing-a, cn-beijing-b, cn-beijing-c). But it is straightforward to add more Aliyun data centers in the compute service setup page.
In this blog, we choose MySQL as the application pack to deploy. The following picture shows the deployment was successful on Aliyun.
During the deployment, we could also see from Aliyun web console that there was a compute being launched for this deployment.
Alibaba Cloud is one of the largest cloud providers, primarily serving the Asian-based users. Now it is expanding its data centers oversea and onboarding Alibaba Cloud should bring more adoptions of OneOps in the near future. Please stay tuned for more updates!