Skip to content

Latest commit

 

History

History
180 lines (111 loc) · 4.65 KB

File metadata and controls

180 lines (111 loc) · 4.65 KB

Dashboard

In this exercise, you will use the OpenStack Dashboard to create a new security group, start an instance, attach a floating IP, and attach a volume.

You should now be able to access the dashboard by pointing your web browser at the public IP of your instance.

  • Username: demo
  • Password: (see ADMIN_PASSWORD variable in /opt/stack/devstack/localrc)

Create a security group that allows ssh and ping

We are going to create a new security group that only allows ssh (port 22) and ping (icmp) traffic.

  1. Click "CURRENT PROJECT" at the left and select "demo"

  2. Click "Access & Security" at the left.

  3. Click "Create Security Group"

  4. Fill in the following fields:

    • Name: ssh
    • Description: allow ssh and ping
  5. Click "Create Security Group"

It may take a few seconds, but eventually the new security group will appear in the Security Groups table.

  1. Click "Edit Rules" on the "ssh" Security group

  2. Click "Add Rule"

  3. Fill in the following fields:

    • Rule: Custom TCP Rule
    • Direction: Ingress
    • Open Port: Port
    • Port: 22
    • Remote: CDIR
    • CIDR: 0.0.0.0/0
  4. Click "Add"

  5. Click "Add Rule"

  6. Fill in the following fields

  • Rule: ALL ICMP
  • Direction: Ingress
  • Remote: CIDR
  • CIDR: 0.0.0.0/0
  1. Click "Add"

Launch an instance inside of DevStack

Make sure the CURRENT project is on "demo".

  1. Click the "Instances" link on the left, and click "Launch instance" at the top-right

    • Availability Zone: nova
    • Instance Name: test
    • Flavor: m1.tiny
    • Instance Count: 1
    • Instance Boot Source: Boot from image.
    • Image Name: cirros-0.3.1-x86_64-uec (24.0 MB)

    launch instance

  2. Click "Access & Security"

  3. Under "Security Groups", select "ssh" and unselect "default"

    We aren't going to specify a keypair in this case, since we'll be logging into the instance with user name and password. However, in typical usage, you'd specify a public ssh key that you'd use to ssh into it.

  4. Click "Networking"

  5. Click the blue "+" on the "private" in "Available networks". It should move to "Selected Networks"

    launch instance net

  6. Click "Launch"

Allocate a floating IP and attach to an instance

By default, OpenStack instances aren't reachable without a floating IP.

  1. At the "Instances" view, click "More" under Actions and choose "Associate floating IP". tw associate floating ip

  2. Click the "+" next to "No IP addresses available" to alllocate a new floating IP.

    allocate floating ip

  3. Click "Allocate IP" to allocate an IP address from the "public" pool.

  4. Click "Associate" to associate the IP address with the instance.

  5. Wait a few seconds, then reload your web browser

You should eventually see two IP addresses in the "IP address field which are most likely:

  • 10.0.0.3
  • 172.24.4.227

10.0.0.3 is your fixed IP, and 172.24.4.227 if your floating IP.

Try to ssh to the floating IP address: 172.24.4.227 as the user cirros:

$ ssh cirros@172.24.4.227

The password is: cubswin:)

You should see the following output:

The authenticity of host '172.24.4.227 (172.24.4.227)' can't be established.
RSA key fingerprint is b4:6f:8b:86:e8:8b:73:56:ac:3d:c2:ab:57:7e:eb:7f.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '172.24.4.227' (RSA) to the list of known hosts.
cirros@172.24.4.227's password:
$

Create and attach a volume

In the dashboard:

  1. Click "Volumes" at the left
  2. Click "Create Volume"
  3. Name it "myvolume", of size 1 GB. Leave other values as defaults.
  4. Click "Create Volume"

When the volume status becomes "Available":

  1. Click "Edit Attachments"
  2. Select "test" as the instance
  3. Specify "/dev/vdb" as the device name
  4. Click "Attach Volume"

Inside of your cirros instance, you should now see a /dev/vdb device. You can format it and mount it as a drive.

$ sudo mkfs.ext4 /dev/vdb
$ sudo mount /dev/vdb /mnt

Exit the cirros instance:

$ exit

Add a file to object store

In the dashboard:

  1. Click "Containers" at the left
  2. Click the "Create Container" button
  3. Name it "mycontainer"
  4. Click the "Upload Object" button
  5. Set Object Name: logo.png, click "Browse..." and choose the Openstack logo file downloaded earlier.
  6. Click "Upload Object" button.

The "logo.png" file should appear in the dashboard.

For the rest of the exercises, make sure you are logged in to the Rackspace virtual machine instance ("devstack") when issuing the commands.

Next exercise is the Under the hood: compute.