Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Follow the instructions below to create The following sub-sections describe the steps involved in creating a cartridge base image on GCEthe OpenStack IaaS:

Table of Contents

Step 1 - Spawn an instance

  1. Navigate to the Google Developers Console.
  2. Launch an instance with your preferred OS and other related settings as follows.
    1. On the Compute menu, click Compute Engine and then click VM instances.
    2. Click Create instance

      The create a new instance interface appears.
    3. After entering the required instance details, click Save to create the instance.
  3. 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).

    1. On the Compute menu, click Compute Engine and then click VM Instances.
    2. Click the more option in the Connect column.
    3. Click Open in browser window.

     

Step 2 - Configure the cartridge base image

Include Page
Configuring a Base Image
Configuring a Base Image

Step 3 - Create a snapshot of the instance

  1. Set the auto-delete 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.

    1. On the Compute menu, click Compute Engine and then click VM Instances.
    2. Click on the name of the instance.

    3. Edit the settings related to the instance. 

    4. Uncheck the Delete boot disk when instance is deleted option. This is done to ensure that all the data is not deleted when you terminate the instance.

    5. Click Save.
      If you wish to view details on the disk related to the instance, click Compute Engine and thenclick Disks.  

  2. Delete the instance.
    Initially, you need to terminate the spawned instance using the root persistent disk to be able to create an image. When you are terminating the instance make sure the persistent disk is not attached to any other virtual machines.

    1. On the Compute menu, click Compute Engine and then click VM Instances.
    2. Check the instance that you need to delete.
    3. Click Delete to delete the instance.
  3. Create a new image as follows.

    1. On the Compute menu, click Compute Engine and then click Images.
    2. Click Create Image.
    3. 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 disk.
    4. Click Create
      Image Modified
      The newly created image is immediately available under the Images section.
      Image Modified