Software should be available free of charge, that software tools should be usable by ... Ubuntu Studio: Designed for multimedia editing and creation ... have to make copies of the image file so that there is no need to download and .... Before we start deploying applications, Juju needs to bootstrap a controller for the LXD.
-: Complete Platform Deployment and Experimentation Report :- by:
Muhammad Amjad, Kashif Saleem, Haider Abbas, Jalal Al-Muhtadi Center of Excellence in Information Assurance (CoEIA), King Saud University.
Table of Contents -: Complete Platform Deployment and Experimentation Report :- ........................................................... 1 Introduction to Ubuntu .......................................................................................................................................... 2 Features .................................................................................................................................................................. 2 Security ................................................................................................................................................................... 2 Variant’s: ................................................................................................................................................................ 3 Requirements: ........................................................................................................................................................ 3 Ubuntu Server: ....................................................................................................................................................... 3 Requirements: ........................................................................................................................................................ 3 OpenStack Autopilot: ............................................................................................................................................. 4 Requirements: ........................................................................................................................................................ 4 VMware workstation: ............................................................................................................................................. 4 Products: ................................................................................................................................................................ 4 Cloud management software: VMware vRealize Suite ...................................................................................... 5 Public cloud: VMware vCloud Air ...................................................................................................................... 5 Application management: VMware Workspace ................................................................................................. 5 Advantages of using VMware: ................................................................................................................................ 5 Configuring NAT(Network Address Translation): ................................................................................................... 8 Now install GUI in Ubuntu Server ........................................................................................................................ 11 OpenStack Autopilot: ........................................................................................................................................... 14 Requirements: ...................................................................................................................................................... 14 VMware workstation: ........................................................................................................................................... 15 Cluster: ................................................................................................................................................................. 22 Cluster in Maas server: ......................................................................................................................................... 23 Benefits: ............................................................................................................................................................... 23 PXE (Preboot eXecution Environment): ............................................................................................................... 24 Openstack Autopilot: ........................................................................................................................................... 30 Autopilot packages in Ubuntu: ............................................................................................................................. 30 Advantages or benefits: ....................................................................................................................................... 30 Juju ....................................................................................................................................................................... 31 MAAS: ................................................................................................................................................................... 31 Advantages: .......................................................................................................................................................... 31 Landscape: ............................................................................................................................................................ 32 Security: ............................................................................................................................................................... 32 The Cloud of CoEIA, King Saud University: ........................................................................................................... 38
Introduction to Ubuntu Ubuntu is an ancient African word, meaning “humanity to others”. Ubuntu also means “I am what I am because of who we all are”. Ubuntu is a complete Linux based operating system, freely available with both community and professional support. Software should be available free of charge, that software tools should be usable by people in their local language and despite any disabilities, and that people should have the freedom to customize and alter their software in whatever way they see it.
Features A default installation of Ubuntu contains a wide range of software that includes LibreOffice, Firefox, Thunderbird, Transmission, and several lightweight games such as Sudoku and chess. Many additional software packages are accessible from the built in Ubuntu Software Centre as well as any other APT-based package management tools. Many additional software packages, such as Evolution, GIMP, Pidgin, and Synaptic, which are no longer installed by default, are still accessible in the repositories, installable with the built in Ubuntu Software Centre or by any other APT-based package management tool.
Security Ubuntu's goal is to be secure "out-of-the box". By default, the user's programs run with low privileges and cannot corrupt the operating system or other users' files. For increased security, the sudo tool is used to assign temporary privileges for performing administrative tasks, which allows the root account to remain locked and helps prevent inexperienced users from inadvertently making catastrophic system changes or opening security holes .Ubuntu also supports full disk encryption as well as encryption of the home and Private directories. https://en.wikipedia.org/wiki/Ubuntu_(operating_system)
Ø
Variant’s: Edubuntu: Ubuntu for education
Ø
Ubuntu GNOME: Ubuntu with the GNOME desktop environment
Ø
Kubuntu: Ubuntu with the K Desktop environment
Ø
Ubuntu Kylin: Ubuntu localised for China
Ø
Lubuntu: Ubuntu that uses LXDE
Ø
Mythbuntu: Designed for creating a home theatre PC with MythTV
Ø
Ubuntu Studio: Designed for multimedia editing and creation
Ø
Xubuntu: Ubuntu with the XFCE desktop environment
Ø
Ubuntu MATE: Ubuntu with the MATE desktop environment
Requirements: For the Ubuntu desktop release 16.04 LTS, a PC with at least 2 GHz dual core processor, 2 GB of RAM and 25 GB of free disk space is recommended.
Ubuntu Server: Ubuntu has a server edition that uses the same APT repositories as the Ubuntu Desktop Edition. The differences between them are the absence of an X Window environment in a default installation of the server edition.
Requirements: PC with at least 2 GHz dual core processor, 2 GB of RAM and 25 GB of free disk space is recommended.
OpenStack Autopilot: Ø It is the easiest dynamic openstack installer. Ø It handles all activities of cloud during(Installation, Expansion, every day operations). Requirements: Ø A minimum of 5 machines with the following roles: o
1 machine for the MAAS server
o
1 machine for the Autopilot
o
3 or more machines for the cloud:
§
At least one must have 2 NICs
§
At least 3 must have 2 disks
Ø A dedicated switch to create a private cloud LAN Ø Internet access through a router on that LAN
In order to install open stack autopilot we require 5 machines so we are going to use VMware workstation. VMware workstation: It enables users to set up virtual machines (VMs) on a single physical machine, and use them simultaneously along with the actual machine. Each virtual machine can execute its own operating system, including versions of Microsoft Windows, Linux, and MS-DOS. Products: Desktop software: VMware Workstation, VMware Fusion. Server software: VMware vSphere, VMware Server. https://www.ubuntu.com/download/cloud
Cloud management software: VMware vRealize Suite Public cloud: VMware vCloud Air Application management: VMware Workspace
Ø Ø Ø Ø
Advantages of using VMware: Time saving Cost saving Resource sharing Working simultaneously
Downloaded VMware pro 12.5 from its official website and installed in my system
After installation of VMware then we have create a new virtual machines in VMware.
Configuring NAT(Network Address Translation): When we create a new virtual machine, we have one of many options when it comes to choosing your network connectivity. Two common options are to use either bridged networking or network address translation (NAT).
Network Address Translation (NAT) is the process where a network device, usually a firewall, assigns a public address to a computer (or group of computers) inside a private network. The main use of NAT is to limit the number of public IP addresses an organization or company must use, for both economy and security purposes.
Bridged mode acts just like the interface you're bridging with is now a switch and the VM is plugged into a port on it. Everything acts the same as if it were another regular machine attached to that network.
Here we are using NAT because it doesn’t see the production network directly.
After configuring NAT and installation of Ubuntu server on a virtual machine then we have to make copies of the image file so that there is no need to download and install a fresh copy of operating system . To create 6 virtual machines to form a openstack autopilot we first install Ubuntu server on first virtual machine and named it as Masserv
We have to make 5 copies now of the Masserv and rename them as Cloud1,cloud2,cloud3,Autopilot, Backup of Masserv.
Now we call vmware cloud1 and all for installation by creating new virtual machines .
Now install GUI in Ubuntu Server It can be install in two ways they are: 1) Install desktop Environment 2)InstallWebmin 1) Install desktop Environment use the following command to install GUI sudo apt-get update sudo apt-get install ubuntu-desktop The above command will install GNOME desktop If you want to install light weight desktop install xfce using the following command sudo apt-get install xubuntu-desktop http://www.ubuntugeek.com/install-gui-in-ubuntu-server.html
After installing GUI then the screen looks like this
We can set root password from the terminal window by using the following command maser@ubuntu:~$ sudo passwd root [sudo] password for maser:
Command to check the ip configuration is maser@ubuntu:~$ ifconfig
Command for uname: maser@ubuntu:~$ uname -a gives the machine operating system and kernel
Command for packaging tool: maser@ubuntu:~$ apt
maser@ubuntu:~$ shutdown –r now It is used to shut down the task.
OpenStack Autopilot: Ø It is the easiest dynamic openstack installer. Ø It handles all activities of cloud during(Installation, Expansion, every day operations). Requirements: Ø A minimum of 5 machines with the following roles: o
1 machine for the MAAS server
o
1 machine for the Autopilot
o
3 or more machines for the cloud:
§
At least one must have 2 NICs
§
At least 3 must have 2 disks
Ø A dedicated switch to create a private cloud LAN Ø Internet access through a router on that LAN
In order to install open stack autopilot we require 5 machines so we are going to use VMware workstation.
VMware workstation: It enables users to set up virtual machines (VMs) on a single physical machine, and use them simultaneously along with the actual machine. Each virtual machine can execute its own operating system, including versions of Microsoft Windows, Linux, and MS-DOS. https://www.ubuntu.com/download/cloud
So now the first step is to install MAAS server in 1machine. There are some Installation instructions to follow:
1. Set up hardware First we have to install Ubuntu server 16.04 on the virtual machine designated to be the MAAS server. After installation of Ubuntu server which can be seen here.
2. Add required repositories: From the terminal we have to install some packages like, sudo apt-get install python-software-properties sudo add-apt-repository ppa:cloud-installer/stable sudo apt-get update https://www.ubuntu.com/download/cloud
3. Install MAAS To install MAAS Firstly we have to restart the Ubuntu server machine and follow the instructions: In the terminal we have to run the command
sudo apt-get install maas While running this command I got error while installing packages.
Issue 1 :
So I have serched through internet and found lots of solution but I found this is best because I think it is genuine. Solution: The solution is we have to disable accelerated 3D graphics of the virtual machines. Reason: My system has two graphic adaptors so I need to disable 3D accelerated graphics.If there is no advance graphics in the system then there is no need to disable it.
•
We Create admin credentials by typing: sudo maas-region-admin createadmin
Now by using the ifconfig we can determine the ip addrees of the machine so now we have to go the next step which is login into maas.
•
Login to the MAAS UI at http://192.168.159.129/MAAS/ So now we have to enter the login credentials ,
Now we have enter in the login page now the next step is to •
Go to the settings tab and change the image download URL in the Boot Images section to http://images.maas.io/ephemeral-v2/daily/ and click save
•
Now in MAAS user’s settings (top-right corner) add your personal public SSH key so you can later log into the nodes. So now this can be done by using the command root@ubuntu: # ssh –keygen –t rsa so this will generate ssh public and private keys.
Now we have to Import ssh public keys in the maas user settings.
Now the next step is to configure the MAAS cluster: Cluster:
A computer cluster consists of a set of loosely or tightly connected computers that work together so that, in many aspects, they can be viewed as a single system. computer clusters have each node set to perform the same tasks, which are controlled and scheduled by software. Advantages: ü To improve performance ü Parallel processing ü High processing capacity.
Cluster in Maas server:
Clusters in maas server are used to distribute the tasks to different nodes.
Benefits:
ü To scale up performance
ü Parallel processing ü High processing capacity But in our approach we don’t require clusters because we are running MAAS server in VMware and thus we don’t need any nodes to form cluster. We will enable this option in future if we adopt to do it. PXE (Preboot eXecution Environment): Preboot eXecution Environment specification describes a standardized client-server environment that boots a software assembly, retrieved from a network, on PXE-enabled clients. On the client side it requires only a PXE-capable network interface controller (NIC), and uses a small set of industry-standard network protocols such as DHCP and TFTP.
Ø Now we have to ensure that all machines are set to PXE boot. This can be done when we enter the guest login we have to press mouse click+F2 then the boot system screen opens. Then we have to set first boot device to network boot in order to set PXE it will load the image which are in the network. We have to restart the system so that it will request server the image.
https://en.wikipedia.org/wiki/Preboot_Execution_Environment
This can be seen in the below screen shot its reading pxe image:
Ø Now we have to power the machines on so that they appear in the nodes tab in MAAS server.
There are 4 machines which are running which can be seen in the above screen.
Ø Now we have launch Openstack Autopilot. The Ubuntu OpenStack Autopilot deploys an OpenStack cloud using Juju, MAAS and Landscape. Now we setup Landscape and launch the OpenStack Autopilot with the following commands: Sudo apt-get install openstack So we have to use juju to reducing the operation overhead of software by facilitating quickly deploying, configuring, scaling, integrating, and performing operational tasks on a wide choice of public and private cloud services along with bare metal servers and local container based deployments. Following commands should be run: sudo add-apt-repository -u ppa:juju/stable sudo apt install juju lxd zfsutils-linux
https://jujucharms.com/docs/stable/getting-started Before we start deploying applications, Juju needs to bootstrap a controller for the LXD configuration we created.
The juju bootstrap command is used to create the controller. juju bootstrap localhost lxd-test juju controllers If we run the above commands then the output is :
The following command shows the currently active controller, model, and user: juju whoami
https://jujucharms.com/docs/stable/getting-started
Juju is ready to deploy applications from among the hundreds included in the Juju charm store. Here we test a new model.we select a MediaWiki site. juju deploy cs:bundle/mediawiki-single
Now if we run the following command then it will give the status of cloud.
juju status
https://jujucharms.com/docs/stable/getting-started
Run the following command to explore the clouds. Juju clouds
Now run the following command :
Juju bootstrap localhost openstack-install
https://jujucharms.com/docs/stable/getting-started
Now we try to run juju using gui command Juju gui –show-credentials
We can use Juju Gui to login through the above username and password.
Openstack Autopilot:
OpenStack Autopilot is the easiest dynamic OpenStack installer. It handles every aspect of your cloud both during installation, expansion, and everyday operations. Autopilot packages in Ubuntu:
Ø autopilot-desktop: Autopilot support for the Ubuntu Desktop platform. Ø autopilot-touch: Autopilot support for the Ubuntu Touch platform Ø python3-autopilot: Utility to write and run integration tests easily (Python 3). Ø python3-autopilot-tests: Tests for the autopilot functional test tool. (Python 3) Ø python3-autopilot-trace: Support for tracing in autopilot (Python 3). Ø python3-autopilot-vis: visualisation application for Autopilot (Python3) Advantages or benefits: •
Fully automated bare-metal OpenStack deployment and operations tool
•
Intelligent hardware mapping optimises scale-out cloud architecture for cluster
•
Containerised deployment eases administration and scaling
•
Eliminates need for OpenStack expertise or consulting
The Ubuntu OpenStack Autopilot deploys an OpenStack cloud using
Ø Juju, Ø MAAS and Ø Landscape. Juju
Juju is an open source application modelling tool developed by CanonicalLtd. the company behind Ubuntu. Juju focuses on reducing the operation overhead of today's software by facilitating quickly deploying, configuring, scaling, integrating, and performing operational tasks on a wide choice of public and private cloud services along with bare metal servers and local container based deployments. Juju's mission is to provide a modeling language for users that abstracts the specifics of operating complex big software topologies. Doing so reduces the cost of operations and provides flexibility. https://www.ubuntu.com/cloud/openstack/autopilot
Juju can also be used to operate software on bare-metal servers by using Metal as a Service in containers using LXD, and more. MAAS:
Metal-as-a-Service, or MAAS, is a provisioning construct created by Canonical, developers of the Ubuntu Linux-based operating system. MAAS is designed to help facilitate and automate the deployment and dynamic provisioning of hyperscale computing environments such as big data workloads and cloud services. MAAS delivers the fastest OS installation times in the optimised imagebased installer.
Advantages: •
Zero-touch deployment of Windows, Ubuntu, CentOS, RHEL and SUSE
•
Inventory management of every device in every server
•
Open-source IP Address Manager (IPAM)
•
Includes a REST API, Web UI and command-line client
•
Designed for devops at scale — big data, private cloud, PAAS and HPC all thrive on MAAS. Landscape:
Landscape is the leading management tool to deploy, monitor and manage Ubuntu servers. It features Autopilot, the fastest way to build an OpenStack cloud. Landscape is part of Ubuntu Advantage, Canonical’s world-class support service. https://www.ubuntu.com/cloud/juju Landscape is the most cost-effective way to support and monitor large and growing networks of desktops, servers and clouds. Reduce your team's efforts required for basic, day-to-day management. Now featuring Autopilot, the fastest way to build an OpenStack cloud. Security: •
Patch compliance - keep systems secure and up to date
•
Role Based Access Control (RBAC)
•
Automated audit logging and compliance reporting
•
Regulatory compliance is significantly simplified with custom reporting
In order to launch openstack autopilot I have to run the below command but there were some errors got stuck with this command. sudo JUJU_BOOTSTRAP_TO= openstack-install
and after going through juju help and there was some syntax error for the above command so we have successfully solved the above error. Which can be sceen in the below screenshot. https://www.ubuntu.com/server/maas
Now we try to run juju using gui command Juju gui –show-credentials
We can use Juju Gui to login through the above username and password. We have to use the above link to open juju gui page in browser. https://www.ubuntu.com/download/cloud/autopilot
We have to add the security exception in order to open the login page
Certificate can be seen in the below screen shot.
Juju GUI login page enter the login details .
The Cloud of CoEIA, King Saud University:
Now we have to add the cloud CoEIA . First we create a yaml file in vi editor which can be seen in the screen shot.
When we run the command to add the cloud using # Juju add-cloud coeia coeia.yaml We got the error.
By using juju help command we have successfully solved the above error which can be seen in the below screen shot.
We have edited the yaml file.
Now we run the add cloud command and we have successfully added COEIA cloud. #juju add-cloud coeia coeia.yaml. Now we can see clouds using
# juju clouds Which can be seen in the below screen shot which is in blue color.