0% found this document useful (0 votes)
6 views10 pages

Week 1 - College 1 (OpenStack)

The document provides a detailed guide on setting up OpenStack as an infrastructure-as-a-service (IaaS) platform using Rocky Linux 9.5. It includes prerequisites, installation steps, configuration of networks and virtual machines, and troubleshooting tips for common issues. The final steps involve creating public and private networks, launching a VM, and associating it with a floating IP for external access.

Uploaded by

aimane-2006
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views10 pages

Week 1 - College 1 (OpenStack)

The document provides a detailed guide on setting up OpenStack as an infrastructure-as-a-service (IaaS) platform using Rocky Linux 9.5. It includes prerequisites, installation steps, configuration of networks and virtual machines, and troubleshooting tips for common issues. The final steps involve creating public and private networks, launching a VM, and associating it with a floating IP for external access.

Uploaded by

aimane-2006
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

Week 1 - College 1 (OpenStack)

OpenStack is an open-source software platform for cloud computing, mostly


deployed as infrastructure-as-a-service (IaaS), whereby virtual servers and other
resources are made available to end users. OpenStack embraces a modular
architecture to provide a set of core services that facilitates scalability and elasticity:

Prerequisites
VMware Workstation:
- VMnet8:
- NAT,
- Gateway (Book uses 192.168.37.2 , but I'm keeping 192.168.65.2 )
- DHCP Scope 192.168.37.128 - 192.168.37.250 , but I'm using .65.

Download Rocky 9.5 DVD ISO (not Rocky 8)

Create a new Virtual Machine:

Initial Options:
Custom (Advanced) -> Install OS later -> Linux & Rocky Linux 64-bit
Name: packstack.openstack.local
CPU: leave as is (2/1)
RAM: 11 GB (I use 12.288 )
Network: NAT
Disk: 60GB
Finish
Advanced Options:
Hardware:
Processors: Enable "Virtualize Intel VT-x/EPT or AMD-V/RVI" (bugged)
CD/DVD (IDE): Select "Use ISO image file" and select the Rocky9 ISO
Options:
Time Sync: On
Installing Operating System:
Language: English / English (US)
Time & Date: Europe / Amsterdam
Root Password: Pa$$w0rd
User Creation:
Full name: Quinten
User name: quinten
Make user administrator
Password: Pa$$w0rd
Software Selection: Minimal install / Standard
Installation Destination: Automatic partitioning
Network & Host Name:
ens160: Enable Manual IPv4
Address: 192.168.64.100
Netmask: 24
Gateway: 192.168.64.2
DNS: 192.168.64.2
Turn interface off / on again
Host Name: packstack.openstack.local
Configuring Operating System:
Run the following commands:

# Update packages, set hostname if not yet done


dnf update -y
#hostnamectl set-hostname packstack.openstack.local

# Disable SeLinux
sestatus # Check current status
nano /etc/sysconfig/selinux # Set SELINUX=disabled
reboot now # Reboot the machine
sestatus # Confirm disabled

# Install packages
dnf config-manager --enable crb
dnf install -y centos-release-openstack-caracal
dnf update -y # Update again
dnf install -y openstack-packstack

# Disable Firewall & NetworkManager


systemctl disable --now firewalld
systemctl disable --now NetworkManager

# Installing more Packages


dnf install -y network-scripts
dnf install -y telnet nano

# Enable deprecated network? Very weird issues, why use network?


systemctl enable network # weird issue, ignore
systemctl start network

# Make changes to /etc/hosts


nano /etc/hosts # Then post the following 4 lines
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.locald
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.64.100 packstack packstack.openstack.local
192.168.64.101 compute compute.openstack.local

# Confirm IP Routes
ip route # Default 192.168.64.2, route to .64.0/24

# Modify Network
cd /etc/sysconfig/network-scripts/
nano ifcfg-ens160 # Paste the following
NAME=ens160
DEVICE=ens160
TYPE=Ethernet
BOOTPROTO=none
DEFROUTE=yes
ONBOOT=yes
IPADDR=192.168.64.100
PREFIX=24
DNS1=8.8.8.8
GATEWAY=192.168.64.2

# Restart the network service


systemctl restart network
systemctl status network # Confirm interface ens160 = OK

Power off the system, take a snapshot and power on again.

Install PackStack using Puppet

# This is one command, takes a very long time


packstack --allinone --provision-demo=n --os-neutron-ovn-bridge-mappin

OpenStack Dashboard

1. Go to http://192.168.64.100/dashboard and check no errors ensue.


2. If you do run into an error, use nano /etc/openstack-
dashboard/local_settings , then search for
django.core.cache.backends.memcached.MemcachedCache & replace with
django.core.cache.backends.memcached.PyMemcacheCache .
3. Run pip install pymemcache
4. Run systemctl restart httpd .
5. Run cd && cat keystonerc_admin to view credentials:
admin:7879cab79290470b

Power off the system, take a snapshot and power on again.

Configure OpenStack Network and VM

1. Open http://192.168.64.100/dashboard/ and log in using admin


2. Create a Public Network. This will contain the floating IPs to connect to from the
outside world. Do this using:
1. Admin -> Network -> Networks -> Create Network
2. Network:
1. Name: public
2. Project: admin
3. Provider: Flat
4. Physical Network: extnet
5. Enable Admin State: Yes
6. Shared: Yes
7. External Network: Yes
8. Create Subnet: Yes
3. Subnet:
1. Name: public-subnet
2. Network Address: 192.168.64.0/24
3. IP Version: IPv4
4. Gateway IP: 192.168.64.2
4. Subnet Details:
1. Enable DHCP: No
2. Allocation Pools: Range outside the scope of VMware DHCP. So
192.168.64.50,192.168.64.75 (MUST STILL BE IN THE SAME
SUBNET)!
3. DNS Name Servers: 8.8.8.8
5. Create
3. Create a Private Network. This will contain the private IPs of our VMs. These IPs
can connect to the outside world. Do this using:
1. Project -> Network -> Networks -> Create Network
2. Network:
1. Name: private
2. Enable Admin State: Yes
3. Shared: No
4. Create Subnet: Yes
3. Subnet:
1. Name: private-subnet
2. Network Address: 10.1.0.0/24
3. IP Version: IPv4
4. Gateway IP: 10.1.0.1 (First address in the network)
4. Subnet Details:
1. Enable DHCP: Yes
2. Allocation Pools: 10.1.0.10,10.1.0.30
3. DNS Name Servers: 8.8.8.8
5. Create
4. Connect both networks using a router
1. Project -> Network -> Routers -> Create Router
1. Name: router1
2. External Network: public
2. Create Router
3. Select router1 -> Interfaces an interface for the external network is
already present (192.168.64.75)
4. Select Add Interface
1. Subnet: private: 10.1.0.0/24 (private-subnet)
2. IP Address: 10.1.0.1
5. Submit
5. View the network topology for what we have just created.
1. Project -> Network -> Network Topology
6. Allow data flowing to the network (open the firewall)
1. Project -> Network -> Security Groups -> Select Manage Rules on
default
2. View the traffic that is allowed
1. Egress (outgoing): All traffic allowed
2. Ingress (incoming): Only from VMs in the same security group
3. Allow management from local PC by:
1. Select Add Rule
1. Rule: All ICMP
2. Direction: Ingress
3. Remote: CIDR
4. CIDR: 0.0.0.0/0
5. Add
2. Select Add Rule
1. Rule: SSH
2. Remote: CIDR
3. CIDR: 0.0.0.0/0
4. Add
7. Spawn a new VM in our Admin Project. We use a standard image called Cirros
(small Debian-like Linux version of 12MB in size).
1. Run source keystonerc_admin
2. Run curl -L http://download.cirros-cloud.net/0.6.2/cirros-0.6.2-
x86_64-disk.img | glance image-create --name='cirros image' --
visibility=public --container-format=bare --disk-format=qcow2
8. Launch our first VM using:
1. Project -> Compute -> Instances -> Launch Instance
2. Details:
1. Instance Name: Cirros1
3. Source:
1. Delete Volume on Instance Delete: Yes
2. Use the "Up-Arrow" on cirros image to select it
4. Flavor:
1. Use the "Up-Arrow" on m1.tiny to select it. This will be explained
later.
5. Networks:
1. Use the "Up-Arrow" on private to select it
6. Launch Instance
7. Wait until done. Confirm Power State is Running .
9. Make it available from the outside world by associating it with a Floating IP from
the Public Pool
1. Use the "Down-Arrow" on m1.tiny1 and select Associate Floating IP
1. IP Address: Select +
1. Pool: public
2. Allocate IP
2. Confirm IP Address is showing
3. Ports to be associated: Confirm it has received Cirros1: 10.1.0.x
4. Associate
2. Confirm it works by pinging from your host to the Floating IP address
3. SSH to your instance using ssh [email protected] with pass
gocubsgo
4. From within Cirros instance, run ping www.klm.nl and confirm it works
5. On PackStack, run ip a and ovs-vsctl show for additional insight.
We have now successfully created the following topology:

Shutdown Instances:

1. Use the "Down-Arrow" on m1.tiny1 and select Shut Off Instance

Power off the system, take a snapshot and power on again.

You might also like