- Date of last update: 09/25/2019
Use this template to provision a classic virtual server instance (VSI) in IBM Cloud by using Terraform or IBM Cloud Schematics, and configure the instance with the components of the LEMP stack:
- MySQL (mariadb)
To apply the LEMP template in IBM Cloud with IBM Cloud Schematics, you must select the template from the IBM Cloud catalog, enter the configuration for your classic virtual server instance, and install the template. When you install the template, IBM Cloud Schematics creates a workspace and starts provisioning your resources by using Terraform. You can review logs and your resources from the IBM Cloud Schematics console. For more information, see the IBM Cloud Schematics documentation.
For more information about IBM Cloud classic virtual service instances, see Getting started with virtual servers.
When you apply this template, you are charged for the classic virtual server instance that you configure. The price for your instance depends on your instance configuration. Make sure to review available plans before you apply this template in IBM Cloud. By default, your instance is provisioned as a standard virtual server instance with an hourly billing.
Note: You can remove your virtual server instance and the LEMP stack by deleting your Schematics workspace or your instance with IBM Cloud Schematics. Removing the workspace or the instance cannot be undone. Make sure that you back up any data that you must keep before you start the deletion process.
Before you can apply the template in IBM Cloud, you must have the following permissions in IBM Cloud Identity and Access Management:
- Manager service access role for IBM Cloud Schematics
- Add Server and Cancel Server classic infrastructure permissions that you can find in the Account permission set
- All permissions that are included in the Devices classic infrastructure permission set
- Add Compute with Public Network Port classic infrastructure permission that you can find in the Network permission set
Configuring your deployment values
When you select the LEMP template from the IBM Cloud catalog, you must enter the following values before you can apply the template:
softlayer_api_key: Enter the API key to access IBM Cloud classic infrastructure. For more information for how to create an API key and retrieve it, see Managing classic infrastructure API keys.
softlayer_username: Enter the user name to access IBM Cloud classic infrastructure. You can retrieve the user name by following the instructions for retrieving your classic infrastructure API key.
ssh_key: Enter a public SSH key that you use to access your classic infrastructure virtual server instance. For more information about adding an SSH key, see Adding an SSH key.
You can also choose to customize the default settings for your classic infrastructure virtual server instance:
|Variable Name||Description||Default Value|
|cores||Enter the number of CPU cores that you want to allocate to your classic infrastructure virtual server instance. For supported core, run
|datacenter||Enter the data center where you want to provision your classic infrastructure virtual server instance. For available data centers, run
|disk_size||Enter the numeric disk sizes in GB for the instance’s block device and disk image settings. To view available disk sizes, run
|domain||Enter the domain name that you want to assign to your classic infrastructure virtual server instance. This domain name is used with the
|hostname||Enter a host name for your classic infrastructure virtual server instance. This host name is used with the
|memory||Enter the amount of memory in megabytes that you want to allocate to your classic infrastructure virtual server instance. To find available memory sizes, run
|network_speed||Enter the network speed in Mbps for your classic infrastructure virtual server instance. To find available network speeds, run
|os_reference_code||Enter the reference code of the operating system that you want to install on your virtual server instance. To see available OS reference codes, log in to the IBM Cloud Infrastructure (SoftLayer) API.||CENTOS_LATEST_64|
|private_network_only||Decide if you want to connect your classic infrastructure virtual server instance to a private VLAN only. Enter
|ssh_label||Enter a label that you want to assign to your SSH key.||public ssh key - Schematics VM|
|ssh_notes||Enter a short description that you want to add to your SSH key.|
|ssh_user||Enter the default user name that you want to use to log in to the virtual server instance.||root|
|tags||Enter descriptive tags that you want to add to your virtual server instance. Tags can help find your resource more easily after it is created in IBM Cloud.|
When you apply the template and your LEMP resource is successfully provisioned in IBM Cloud, you see the public IP address that is assigned to your virtual server instance in your Schematics log files. You can use the IP address to access your instance from the internet.