# installing openstack

sudo apt update && sudo apt upgrade -y
sudo apt install git -y
sudo useradd -s /bin/bash -d /opt/stack -m stack
echo "stack ALL=(ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/stack
sudo su - stack
git clone https://opendev.org/openstack/devstack
cd devstack

nano local.conf
[[local|localrc]]

ADMIN_PASSWORD=admin
DATABASE_PASSWORD=admin
RABBIT_PASSWORD=admin
SERVICE_PASSWORD=admin

HOST_IP=127.0.0.1


./stack.sh

http://127.0.0.1/dashboard
Lab 8: OpenStack – Launching an Instance

1. Select an image and create an instance

Open the browser and access the Horizon Dashboard:

http://127.0.0.1/dashboard

Login Credentials:
Username: admin
Password: admin

Navigate to:
Project → Compute → Instances → Launch Instance

Enter instance details and select an image such as:
- Ubuntu
- Cirros

Launch the instance.

--------------------------------------------------

2. Assign a flavor and a key pair

While creating the instance, select a flavor such as:
- m1.tiny
- m1.small

To create a key pair:
Project → Compute → Key Pairs

Create or upload a key pair and attach it to the instance during launch.

--------------------------------------------------

3. Attach a security group with SSH access

Navigate to:
Project → Network → Security Groups

Add a new rule:
- Protocol: SSH
- Port: 22

Attach this security group to the instance.

--------------------------------------------------

4. Allocate and associate a floating IP

Navigate to:
Project → Network → Floating IPs

Steps:
1. Allocate a Floating IP
2. Associate the Floating IP with the instance

After association, connect to the instance using SSH:

ssh -i mykey.pem ubuntu@FLOATING_IP
