An IBM Cloud Schematics template to provision a virtual machine instance and provision Apache, MySQL (mariadb), and PHP onto that instance. Schematics uses Terraform as the infrastructure as code engine. With this template, you can provision and manage infrastructure as a single unit.
See the Bluemix docs for more information about Schematics and the IBM Bluemix Container Service.
Environments can be used to separate software components into development tiers (e.g. staging, QA, and production).
- In Bluemix, go to the menu and select the Schematics dashboard.
- In the left navigation menu, select Templates to access the template catalog.
- Click Create on the containers cluster template. You are taken to a configuration page where you can define data about your environment.
- To use the Schematics-generated keypair for the environment, add the following variables:
temp_public_key
andtemp_private_key
. Settemp_public_key
to$SCHEMATICS.SSHKEYPUBLIC
and settemp_private_key
to `$SCHEMATICS.SSHKEYPRIVATE. - If you want to be able to use an SSH key to access the virtual machine, provide your public SSH key as the value for
ssh_key
. - Define values for your remaining variables according to the following table.
Variable Name | Description | Default Value |
---|---|---|
cores | The number of CPU cores to allocate. | 1 |
datacenter | The data center to create resources in. You can get the list by running bluemix cs locations . |
wdc01 |
disk_size | The numeric disk sizes (in GB) for the instance’s block device and disk image settings. | 25 |
domain | The domain for the instance. | domain.dev |
hostname | The hostname for the instance. | hostname |
memory | The amount of memory, expressed in megabytes, to allocate. | 1026 |
network_speed | The connection speed (in Mbps) for the instance’s network components. | 100 |
os_reference_code | The operating system reference code that is used to provision the computing instance. To see available OS reference codes, log in to the Bluemix Infrastructure (SoftLayer) API. | CENTOS_7 |
private_network_only | When set to true, a compute instance only has access to the private network. | false |
softlayer_api_key | Your Bluemix Infrastructure (SoftLayer) API key. | |
softlayer_username | Your Bluemix Infrastructure (SoftLayer) user name. | |
ssh_key | Your public SSH key to access the VM. | |
ssh_label | An identifying label to assign to the SSH key. | public ssh key - Schematics VM |
ssh_notes | A description to assign to the SSH key. | |
ssh_user | The provisioning username. | root |
tags | Descriptive tags to label the resource. |
After setting up your environment with this template, you can run Plan to preview how Schematics will deploy resources (in this case, a Kubernetes cluster) to your environment. When you are ready to deploy the cluster, run Apply.