com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'next_previous_links' is unknown.

Creating a Cartridge Base Image on OpenStack

The following sub-sections describe the steps involved in creating a cartridge base image on the OpenStack IaaS:

Step 1 - Spawn an instance 

Follow the instructions below to spawn a configured instance of Debian/Ubuntu based Linux 12.04.1 LTS distributions on OpenStack:

  1. Log in to the OpenStack management console.
  2. Click Access & Security on the menu in the left side and click Create Security Group.
  3. In the Add Rule window, enter the configurations of the rules for the security group as required and click Add. For more information on the ports that should be defined, see Required Ports.

  4. In the Create an Image window, enter the configurations for the image as required and click Create Image.
  5. In the Create Key Pair window, enter the configurations for the key pair as required and click Create Key Pair. When the message is prompted, download the key pair and keep it saved in a preferred location.
  6. Protect your key pair by executing the following command in your terminal.
    By default, your PEM file will be unprotected.  Use the following command to secure your PEM file so that others will not have access to it: 

    chmod 0600 <path to the private key>
  7. In the Details section of the Launch Instance window, enter the configurations for the instance as required.
  8. In the Access & Security section enter the configurations for the instance as required and click Create.
  9. Select the created instance in the Instances window and click Launch instance.

Step 2 - Configure the cartridge base image

Follow the steps given below to configure a base Image:

  1. Start up a virtual machine (VM) instance using a preferred OS, on a preferred IaaS.

  2. Install the Puppet agent.

     Install the Puppet agent on Ubuntu
     Install the Puppet agent on CentOS
    1. Enable dependencies and Puppet labs repository on Master.
       

    2. Install and upgrade Puppet on the agent node.

      # yum install puppet
      # puppet resource package puppet ensure=latest
      # /etc/init.d/puppet restart

    For more information on installing the Puppet agent on CentOS, see installing Puppet on CentOS.

  3. Open the puppet file, which is in the <PUPPET_AGENT>/etc/default directory and configure it as follows:

    START=yes
  4. Add the following to the puppet.conf file, which is in the <PUPPET_AGENT> /etc/puppet directory:

    [main]
    server=puppet.ppaas.org

    If you are unsure of the server name, use a dummy hostname. Private PaaS will update the above with the respective server name, when it starts running.

  5. Stop the puppet instance or instances that are running.

    cd /etc/init.d/puppet
    stop
    • When the Puppet agent is installed as mentioned in step 1, there is a high tendency that a puppet instance will start running. Therefore before creating the base image you need to stop any puppet instances that are running.
    • Execute the following command to identify the running puppet instances:

      ps -ef | grep puppet

      The following output will be given, if any Puppet instances are running.

      Example:

      root      1321     1  0 Sep09 ?        00:00:17 /usr/bin/ruby /usr/bin/puppet agent
      root     12149 12138  0 05:44 pts/0    00:00:00 grep --color=auto puppet
  6. Copy the init.sh script into the <PUPPET_AGENT>/root/bin directory.

    You can find the init.sh script for the respective IaaS here.

    The init.sh file differs based on the IaaS. If you wish to find the init.sh script for a different IaaS, go to init-scripts. You can find the respective init.sh script by navigating to the init-script/<IAAS>/<OS> path.

  7. Update the /etc/rc.local file.

    /root/bin/init.sh > /tmp/puppet_log
    exit 0
  8. Execute the following commands:

    rm -rf /var/lib/puppet/ssl/*
    rm -rf /tmp/*

    By executing the above commands you will be cleaning up the base image, for Private PaaS to install the required certificates and payloads. This is done to avoid any errors that will be given, if Private PaaS starts installing a certificate or payload that already exists in the base image.

Step 3 - Create a snapshot of the instance

Follow the instructions below to create a snapshot of the instance on OpenStack:

  1. Log in to the OpenStack management console.
  2. Navigate to Instances on the menu on the left side. 
  3. Select the respective instance and click Create Snapshot.
  4. Enter a name for the image and click Create Snapshot.
  5. Navigate to Images on the menu that is on the left side and get the Image ID. You need to define the Image ID in the Sample Cartridge Definition JSON file. 

 

After you have finished creating the cartridge, make a note of the image ID you created for the cartridge, as you will need this when you use Stratos Manager to add a cartridge.

com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'next_previous_links2' is unknown.