The following sub-sections describe the steps involved in creating a cartridge base image on the OpenStack IaaS:
...
- Navigate to the Google Developers Console.
- Launch an instance with your preferred OS and other related settings as follows.:
- On the Compute menu, click Compute Engine and then click VM instances.
- Click Create instance.
The create a new instance interface appears.
- After entering the required instance details, click Save to create the instance.
SSH to the spawned instance and make relevant changes to the base image (e.g., If you need a PHP cartridge, install PHP related libraries).
- On the Compute menu, click Compute Engine and then click VM Instances.
- Click the more option in the Connect column.
- Click Open in browser window.
Step 2 - Configure the cartridge base image
...
Step 3 - Create a snapshot of the instance
Set the auto-delete state of state of the root persistent disk to
false
as follows:
This is done to avoid the persistent disk from being automatically deleted when you terminate the instance.- On the Compute menu, click Compute Engine and then click VM Instances.
Click on the name of the instance.
Edit the settings related to the instance.
Uncheck the Delete boot disk when instance is deleted option. This This is done to ensure that all the data is not deleted when you terminate the instance.
Click Save.
If you wish to view details on the disk the disk related to the instance, click Compute Engine and then click Disks.
Delete the instance.
Initially, you you need to terminate the spawned instance using the the root persistent disk to to be able to create to create an image. When you are terminating the instance make sure sure that the persistent disk is not attached to any other virtual machines.- On On the Compute menu, click Compute Engine and then click VM Instances.
- Check the instance that you need to delete.
- Click Delete to delete the instance.
Create a new image as follows.:
- On the Compute menu, click Compute Engine and then click Images.
- Click Create Image.
- Provide the Source type as
Disk
and select the relevant disk name from the dropdown menu. You need to do this to create the image based on the persistent diskpersistent disk. - Click Create.
The newly created image is immediately available under the Images section.