Skip to main content
Ask Question
OpenStack
Asked a question recently

How to manually add cluster on demand for OpenStack images

Where am I?

In Bright Computing, Inc. you can ask and answer questions and share your experience with others!

Introduction

The recommended way to add images to a Cluster On Demand cluster, for deployment within OpenStack, is described in the setup article http://kb.brightcomputing.com/faq/index.php?action=artikel&id=3284. However, the standard procedure assumes that the deployment has a decent internet connection, since it involves downloading several large files. This article will describe how the images can be manually obtained on a different machine, and then be imported into the deployment.

Creating local manifest files

The first step is to access the image repository. Using a web browser, access the following URL:
http://support.brightcomputing.com/imagerepo/repo.yaml3

Normally, the repository will only contain a link to where the actual repository is stored. The actual location should now be loaded in the browser. At the time of writing the actual location was here:

https://s3-eu-west-1.amazonaws.com/cod-os-images.support.brightcomputing.com/imagerepo.yaml3

This data will be referred to as the image repo manifest.

From the image repo manifest, two entries should be copy-pasted into two text files. One for the head node image, and one for the compute node image. The files should be named as

<filename>.manifest

where <filename> should be the name as it appears in the URL field in the image repo manifest entry.

For example, at the time of writing, this would result in a file called bcmh-centos7u2-8.0-3.img.gz.manifest, with the following contents:

bcm_version: '8.0'
cmd_revision: 3
created_at: 1500459412
id: centos7u2-8.0
image_type: headnode
md5sum: 1ef82aecc5a3012ec7619de3edadd072
os: centos7u2 package_groups: []
revision: 3
size: 3702725622
tags: [OpenStackTestsFailed, AzureExtensionFailed, KubeFailed, BasicTestsOK]
uncompressed_size: 12883853312
url: bcmh-centos7u2-8.0-3.img.gz
version: 1
cloud_type: "openstack"

Similarly, for the current compute node image, it would be a file called bcmn-centos7u2-8.0-3.img.gz.manifest, containing:

bcm_version: '8.0'
cmd_revision: 3
created_at: 1500458114
id: centos7u2-8.0
image_type: node
md5sum: bbb9728c617bcd8a1b7db88688e35040
os: centos7u2
package_groups: []
revision: 3
size: 1142002999
tags: [OpenStackTestsFailed, AzureExtensionFailed, KubeFailed, BasicTestsOK]
uncompressed_size: 3933208576
url: bcmn-centos7u2-8.0-3.img.gz
version: 1
cloud_type: "openstack"

Downloading the image files

To download the actual image files, the URLs need to be constructed from URL entries in the image repo manifest. These URLs are relative to the location of the image repo manifest itself. So, for the current images the URLs would be:

https://s3-eu-west-1.amazonaws.com/cod-os-images.support.brightcomputing.com/bcmh-centos7u2-8.0-3.img.gz3

https://s3-eu-west-1.amazonaws.com/cod-os-images.support.brightcomputing.com/bcmn-centos7u2-8.0-3.img.gz4

Installing the images

The two downloaded image files, as well as the two created manifest files should be copied to the head node of the deployment. Then, while logged in as root on the head node, the following commands will import the images into the Glance image service (replace the file names with the names of previously-downloaded files):

export OS_PROJECT_NAME="bright"

cm-cluster-on-demand-openstack image install --is-public yes --image-file bcmh-centos7u2-8.0-3.img.gz

cm-cluster-on-demand-openstack image install --is-public yes --image-file bcmn-centos7u2-8.0-3.img.gz