The Entire Setup is divided into 4 steps –

1. Installation of ManageIQ on AWS

2. Integration of ManageIQ with AWS Cloud

3. Using ManageIQ for Service Provisioning

4. Access those Services from ManageIQ (Usage).

1. Installing ManageIQ

Installing ManageIQ consists of the following steps:

1.Downloading the appliance for your environment as a virtual machine snapshot template.

2.Setting up a virtual machine based on the appliance.

3.Configuring the ManageIQ appliance.

After you have completed all the procedures in this guide, you will have a working environment on which additional customizations and configurations can be performed.

1.1. Obtaining the appliance

1.In a browser, navigate to https://www.manageiq.org/download/.

2.Find the table with the relevant type of release.

3.Click Amazon AWS EC2 from the list to download the appliance image.

1.2. Requirements

Below are the two sets of requirements for installing ManageIQ on Amazon EC2.

1.2.1. ManageIQ Requirements

1.44 GB of space on the chosen datastore.

2.12 GB RAM.

3.4 vCPUs.

1.2.2. Amazon EC2 Requirements

1.An Amazon S3 bucket to store the disk image that will be imported to AWS as a snapshot.

2.A VM import service role (IAM role) named vmimport.

For information on creating an Amazon S3 bucket and a VM Import Service Role, see the Amazon EC2 documentation.

1.3. Uploading the Appliance to an Amazon S3 Bucket

From your local file system, you can now upload the ManageIQ appliance VHD image obtained in Obtaining the appliance to the Amazon S3 bucket, using your choice of tool.

1.4. Configuring Amazon EC2 to Import the Appliance

1.Install the AWS client on the computer you want to interact with the AWS API from.

$ pip install awscli
2.Configure and download your AWS secret/access key by following the steps in the Managing Access Keys for Your AWS Account documentation.

3.Configure the AWS client with your access/secret key. For example:

$ aws configure
AWS Access Key ID [******]: ACCESS_KEY
AWS Secret Access Key [******]: SECRET_KEY
Default region name [None]:
Default output format [None]:

4.Create the trust-policy.json file for the vmimport role. For example:

{
“Version”: “2012-10-17”,
“Statement”: [
{
“Effect”: “Allow”,
“Principal”: { “Service”: “vmie.amazonaws.com” },
“Action”: “sts:AssumeRole”,
“Condition”: {
“StringEquals”:{
“sts:Externalid”: “vmimport”
}
}
}
]
}

5.Create the vmimport role using the trust-policy.json file that you just created.

$ aws iam create-role --role-name vmimport --assume-role-policy-document file://trust-policy.json

This user must have permission to create and modify IAM roles.

6.Create the role-policy.json file. Be sure to use the exact S3 bucket name. For example:

{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:ListAllMyBuckets"
],
"Resource": "*"
},
{
"Effect": "Allow",
"Action": [
"s3:CreateBucket",
"s3:DeleteBucket",
"s3:DeleteObject",
"s3:GetBucketLocation",
"s3:GetObject",
"s3:ListBucket",
"s3:PutObject"
],
"Resource": ["arn:aws:s3:::BUCKET_TO_UPLOAD_IMAGE","arn:aws:s3:::BUCKET_TO_UPLOAD_IMAGE/*"]
},
{
"Effect": "Allow",
"Action": [
"iam:CreateRole",
"iam:PutRolePolicy"
],
"Resource": "*"
},
{
"Effect": "Allow",
"Action": [
"ec2:CancelConversionTask",
"ec2:CancelExportTask",
"ec2:CreateImage",
"ec2:CreateInstanceExportTask",
"ec2:CreateTags",
"ec2:DeleteTags",
"ec2:DescribeConversionTasks",
"ec2:DescribeExportTasks",
"ec2:DescribeExportImageTasks",
"ec2:DescribeInstanceAttribute",
"ec2:DescribeInstanceStatus",
"ec2:DescribeInstances",
"ec2:DescribeTags",
"ec2:ExportImage",
"ec2:ImportInstance",
"ec2:ImportVolume",
"ec2:StartInstances",
"ec2:StopInstances",
"ec2:TerminateInstances",
"ec2:ImportImage",
"ec2:ImportSnapshot",
"ec2:DescribeImportImageTasks",
"ec2:DescribeImportSnapshotTasks",
"ec2:CancelImportTask"
],
"Resource": "*"
}
]
}

7.Apply the vmimport role to the ManageIQ appliance image you uploaded to the S3 bucket.

$ aws iam put-role-policy --role-name vmimport --policy-name vmimport --policy-document file://role-policy.json

1.5. Importing the Appliance to Amazon Elastic Compute Cloud (Amazon EC2)

To import the appliance:

1.Create a containers.json file:

{
"Description": " NAME OF IMPORTED SNAPSHOT IN AWS",
"Format": "vhd",
"UserBucket": {
"S3Bucket": "BUCKET WITH UPLOADED .VHD IMAGE",
"S3Key": "PATH OF .VHD IMAGE"
}
}

See the VM import and export requirements, such as image formats, instances, volume and file system types, and using regions.

2.Use the AWS-CLI tools to import a disk as a snapshot. See the AWS documentation on using VM Import/Export to import a disk as a snapshot.

$ aws ec2 import-snapshot --disk-container file://containers.json

You can either specify a region or if not, ensure that the S3 bucket is in the same region where you want to import the snapshot.

3.Check the progress of your snapshot import by running the following command:
 $ aws ec2 describe-import-snapshot-tasks --import-task-ids SNAPSHOT_ID_GOT_FROM_RESPONSE
4.Create an AMI from the snapshot.
 $ aws ec2 register-image
1.Navigate to the custom

AMI in AWS Ec2 console and launch the imported image with the required resources as per the official documentation (16GB RAM, 100GB HDD).

1.To enter the appliance console, Enter the command

appliance_console or ap.

1.Enter the

2. Integration of AWS with ManageIQ

After installing ManageIQ and running it for the first time, you must perform some basic configuration. To configure ManageIQ, you must at a minimum:

1.Add a disk to the infrastructure hosting your appliance.

2.Configure the database.

2.1. Accessing the Appliance Console

1.Start the appliance and open a terminal console.

2.After starting the appliance, log in with a user name of root and the default password of smartvm. This displays the Bash prompt for the root user.

3.Enter the appliance_console command. The ManageIQ appliance summary screen displays.

4.Press Enter to manually configure settings.

5.Press the number for the item you want to change, and press Enter. The options for your selection are displayed.

6.Follow the prompts to make the changes.

7.Press Enter to accept a setting where applicable.

2.2 Integrating the ManageIQ with AWS resources

  1. After initially logging into the Admin Console with default credentials, navigate to Compute > Clouds > Providers.
  2. Enter the credentials as per the Cloud requirement and validate it.
  3. After the validation of the cloud credentials, wait for a few seconds and the data metrics from the cloud will be synced with the ManageIQ Console, Refresh later to see the changes.

2.3. Integration of ‘Git (version control system)’ with ManageIQ

  1. To enable the git integration with ManageIQ, enable the Git Owner Repository in the ManageIQ configuration menu and save the status.
  2. Navigate to Automation > Automate > Import/Export.
  3. Enter the Credentials as required in the picture below and submit it.
Make sure the required repository is connected to the ManageIQ.

3. Using ManageIQ for Service Provisioning

ManageIQ includes a drag-and-drop service dialog editor to create service dialogs. The editor, with its drag-and-drop feature, provides a visual representation of the components that comprise a service dialog. You can easily design your service dialog utilizing dialog tabs, sections (previously referred to as boxes), and elements.

When users access a service, the majority of options available to them are preset and cannot be altered. The requirements for the service determine the options and fields that need to be present in the dialog for user input. A service dialog exposes some of those options to the user so that even if they are ordering a basic Red Hat Enterprise Linux 7 machine, for example, they can at least choose the amount of memory, virtual CPUs, or other options available to the instance they order. In cases where certain fields must be unique, such as the name of virtual machines in Red Hat Virtualization, users must enter their own unique name for the virtual machine they choose or the operation will fail, so this field must be exposed.

3.1. A service dialog contains three components

 

  • One or more Tabs.
  • Inside the tabs, one or more Sections. Note that in the previous method of creating service dialogs using the ManageIQ user interface, Sections were referred to as Boxes.
  • Inside the sections, one or more Elements. Elements are controls that accept input. Elements contain methods, like checkboxes, drop-down lists, or text fields, to fill in the options on the provisioning dialog.

1.Navigate to Automation Automate Customization.

2.Click the Service Dialogs accordion.

3.Click(Configuration), and then(Add a new Dialog).

4.Enter basic details under General:

1.Enter the Dialog’s name and Dialog’s description.

5.Add a new tab to the dialog:

a.click create Tab. Then, click the icon on the new tab to edit tab information.

b.Enter a Label.

c.Optional: Enter a description for the tab in Description.

d.Click Save.

6.Add a new section to the tab:

  • ClickAdd Section. Then, click the icon on the upper-right to edit section details.
  • Enter a Label.
  • Optional: Enter a description for the section in Description.
  • Click Save.
  • Enter a Label, Name, and Description for the element.
  • Element names must correspond to the options used in the provisioning dialog. Name must use only alphanumeric characters and underscores without spaces. It is also used to retrieve the value of this element in the method used with the dialog and must start with dialog_service_type.

  • Optional: Add additional information in Help to assist the user to complete the fields in the service dialog. This field is useful for explaining unfamiliar terminology or providing configuration tips. This information is presented when you hover over the [!] exclamation mark in the Service Dialog while ordering a Service Catalog later.

  • Set other options as required.

  • Click Save.

7.Optional: Repeat the above step to add more elements to the existing section, or create and add elements to a new section as required.

8.Optional: Repeat the step to add a new tab to the dialog, and subsequent steps to add sections and elements to it as required.

9.Click Save to create the dialog.

The service dialog is now created and added to the Service Dialogs accordion.

3.2. Creating a Service Dialog from a Container Template

  1. Navigate to Compute Containers Container Templates and select the template for provisioning.
  2. Click(Configuration), then(Create Service Dialog from Container Template).
  3. Enter a name for the dialog in Service Dialog Name.
  4. Click Save.

You can use this service dialog when creating a catalog item for container template provisioning; see Creating an OpenShift Template Catalog Item.

3.3. Importing Service Dialogs

You can share service dialogs between appliances using the export and import features.

  1. Navigate to Automation Automate Customization.
  2. In the Import/Export accordion, click Service Dialog Import/Export.
  3. In the Import area, click Browse to select an import file.
  4. Click Upload.

3.4. Exporting Service Dialogs

You can share service dialogs between appliances using the export and import features.

  1. Navigate to Automation Automate Customization.
  2. In the Import/Export accordion, click Service Dialog Import/Export.
  3. In the Export area, select the service dialogs that you want to export.
  4. Click Export.

3.5. Creating the First Instance

Provision Your First Instance

Let’s generate a new instance through ManageIQ, the hard way. Don’t worry, And afterward, we will rehearse a method that is easier for customers.

Generate a new instance

Go to Compute → Cloud → Instances, and select your Google provider in the tree.

You will see all the instances in the provider independently of the availability zone they belong to.

If you have more than a cloud provider all your instances from all your providers will be available at the same time and you will be able to interact with them.

Select Lifecycle → Provision Instances from the bar on the top.

After a few seconds, you will have a list of all images available, select the latest version of centos-7.

Press Continue

There are different elements that you need to fulfill:

Request

The information about the request itself, it will be used for reporting, notifications, and to help decide whether approve it or not.

Purpose

Tags are running deeply in ManageIQ, to allow the system to provide functionality like visibility of instances, chargeback, best place provisioning decisions, quotas, etc. You can find a lot of information about this in the documentation.

Catalog

This will allow to modify some characteristics of the instance, like the number of instances, its name and description.

Environment

This will allow you to choose the availability zone and the cloud network to be used.

You can always check choose automatically to allow the system to find the best option for you.

Properties

This allows you to modify the instance type and boot disk size to adapt it to your necessities.

Choose a small instance type: (g1-small) and a boot-disk of 10 GB.

Schedule

This allows you to decide if you want to provision the Instance now or in a later time.

Press Submit

You will see your request go through different stages (you can press Reload to see the changes)

After a few seconds, a new VM will be present, owner and group will be properly set up for this new VM and you will see all the information about it.

Once you have this VM created, you can go to any of the VM and choose Power → Stop or Power → Delete in the upper menu to avoid unnecessary charges

4. Access those Services from ManageIQ (Usage)

Steps to be followed by users in order to request for the Lab 

  1. 1.Login through the PDCloudEx service portal
  2. Navigate to the services tab on the left.
  3. Click on the lab as per the requirement and order the lab by entering the relevant details of the user who will be accessing it.
  4. Add it to the shopping cart and Order the lab

*A notification will be generated that the lab is successfully ordered*

More detailed information can be seen in the order tab on the left side

  • Now it is the task of the Administrator user to Grant Permission for the user*

4.2. Administrator Task

Approving the request of the user lab and providing the public key and IP address of the Instance that has to be sent to the user.

Procedure –

1.Login to the PDCloudEX Administrator portal using the Admin Credentials.

  1. Navigate to

Service > Requests in order to see the status of all the requests by the non admin user

By seeing the request token and analyzing the parameters, decide the request which has to be processed further.

  1. Click on the request and enter the

reason which can be anything related to the user/student/college identity and submit the request.

      Refresh the page in order to approve the request.

4.3. Providing the Instance Identities [public key & IP address] to the user.

4.3.1. Navigate to Service > My Services > Active Services and click on the service name entered by the user and select it.

4.3.2. Click on the instance that is allocated which is seen in the below part of the page and enter it to see its properties.

Note:-

  1. Use MobaXterm client in order to connect to the virtual machines from a Windows machine.

MobaXterm link – https://download.mobatek.net/2022020030522248/MobaXterm_Portable_v20.2.zip

Extract the .zip file and install the software and load the credentials [ public key, hostname, and Public IP address ] and wait for the session connection to be established.

Hostname: ec2-user

  1. To connect from Linux systems to the instances,

Navigate to the folder containing the public key and enter the below command in the terminal

Command : sudo ssh -i <publickeyname> hostname@username

Hostname: ec2-user