Earlier this week our fearless leader Duncan Johnston-Watt asked my teammate Andrea Turli and I to investigate deploying applications onto VEXXHOST (an OpenStack cloud computing provider) with AMP. Short story even shorter, it was dead easy. Here’s all it took:
In this post we will walk you through the easy process of setting up your VEXXHOST OpenStack environment and configuring AMP to target that environment so you can begin to deploy and manage the applications of your choice.
Set Up VEXXHOST Networking
By default, your VEXXHOST environment will contain only a public network. Before AMP can target this environment, you will need to create a private network, a subnet in that network, a router to connect the public and private networks, and optionally a security group.
Create a private network:
Click the Network tab in the VEXXHOST UI
Click + Create Network and provide the name devtest-net
Leave Shared unselected and fill in the required information
Create a subnet in your private network:
Click + Create Subnet from Subnet tab of your private network
Click Create by assigning only a name to the subnet
Create a router:
Click the Routers sub-tab under Network
Click + Create Router
Provide a name
Select your public network
Click Create Router
Create a security group (optional):
Click Access & Security under the Compute tab
Click + Create Security Group and provide the name everything
Click Manage Rules and add ingress and egress for all TCP/UDP/ICMP connections
Creation of this security group, which will allow all TCP/UDP/ICMP ingress and egress traffic to/from the VMs generated by that location, is recommended for simplicity. Just don’t use this in production!
Create an AMP Location
Copy and paste the template location configuration below into your favorite editor and replace your Vexxhost credentials, SSH key info (instructions to follow), and private network ID. Then save it as catalog.bom.
brooklyn.catalog: version: 0.1.0 items: - id: Vexxhost name: Vexxhost itemType: location item: type: jclouds:openstack-nova brooklyn.config: endpoint: https://auth.vexxhost.net/v2.0 identity: <your-identity-here> credential: <your-credential-here> jclouds.keystone.credential-type: passwordCredentials jclouds.openstack-nova.auto-create-floating-ips: true jclouds.openstack-nova.auto-generate-keypairs: false keyPair: <your-key-pair-name-here> loginUser.privateKeyFile: </path/to/your/ssh/private/key/here> generate.hostname: true osFamily: centos osVersionRegex: 7 loginUser: centos # This security group is optional securityGroups: everything templateOptions: networks: [ "<your-private-network-id-here>" ] # devtest-net floatingIpPoolNames: [ "public" ]
Although AMP can auto-generate key pairs, this location will use a key pair created beforehand. Follow this simple guide to generate an SSH key pair if you do not already have one.
The last thing to notice is the floatingIpPoolNames in the templateOptions see floating IP in Openstack for more details.
Add Your Location to the AMP Catalog
Once you install and launch AMP, you can add your VEXXHOST location configuration to the AMP catalog using the AMP CLI.
To acquire the CLI, click the CLI download tile from the AMP home screen and select the appropriate download for your OS.
Once the CLI has been downloaded, open a terminal window and navigate to the downloaded br file (this is the CLI binary), and run the following two commands:
$ br login localhost:8081 admin password $ br catalog add /path/to/your/location/catalog.bom
Your AMP is now ready to deploy and manage applications!
Deploy Some Apps and Show off to Your Boss!
After just a couple of hours, Andrea and I had VEXXHOST and AMP fully configured and ready to deploy and manage applications. We fired up a Hyperledger Fabric cluster, a Kubernetes Cluster, and another Hyperledger Fabric cluster on top of the Kubernetes cluster, all running on VEXXHOST! Duncan was a happy man ;-)