+ All Categories
Home > Documents > K Pre-Post Cloud Tutorial for basic usage · This material explains how to create your first...

K Pre-Post Cloud Tutorial for basic usage · This material explains how to create your first...

Date post: 12-Aug-2020
Category:
Upload: others
View: 0 times
Download: 0 times
Share this document with a friend
32
RIKEN R-CCS MARCH 18, 2019 K Pre-Post Cloud Tutorial for basic usage
Transcript
Page 1: K Pre-Post Cloud Tutorial for basic usage · This material explains how to create your first instance with OpenStack dashboard in order to know what OpenStack virtualization is. Also,

RIKEN R-CCS

MARCH 18, 2019

K Pre-Post Cloud

Tutorial for basic usage

Page 2: K Pre-Post Cloud Tutorial for basic usage · This material explains how to create your first instance with OpenStack dashboard in order to know what OpenStack virtualization is. Also,

This material explains how to create your first instance with OpenStack dashboard in order to know what OpenStack virtualization is.

Also, this material is organized for beginners to learn the K Pre-Post Cloud service.

The following contents are included.

• To access the Horizon as a service portal,

• To configure a security group,

• To create your instance (VM),

• To assign a floating IP address to your instance,

• To access your instance using SSH, and

• To back up your instance.

2

About this Slides

Page 3: K Pre-Post Cloud Tutorial for basic usage · This material explains how to create your first instance with OpenStack dashboard in order to know what OpenStack virtualization is. Also,

3

• Users can quickly handle most of the OpenStack features using a web browser.

• Also, Python-based command interface (CLI) and REST CLI are available to control OpenStack features. (However, this material omits the kind of information for expert users.)

• At first, you need to establish a VPN connection.• We provide an additional material to explain how to use VPN

software. If you’ve never used the VPN software, we recommend to refer the material before getting this material started.

• Access https://10.9.255.25 using a web browser (e.g., Chrome or Firefox and so on).

• The authentication page in the dashboard will appears.

• Note: Since the Horizon uses the self-signed certificate, you need to avoid the security check in your web browser.

• Input the [User Name] and [Password] fields.• A pair of [User Name] and [Password] is the same as you used

in the VPN connection at the first time.

Horizon Service (dashboard)

Page 4: K Pre-Post Cloud Tutorial for basic usage · This material explains how to create your first instance with OpenStack dashboard in order to know what OpenStack virtualization is. Also,

4

Configure a Security Group (1/5)• Create your security group (policy) to control the ingress/egress communication in your

instance.• The default configuration does not allow users to access your instance from the outside network. (All ports in TCP/UDP

are closed due to the security.)

• In this tutorial, as exercise, you try to permit SSH (22/tcp) using the dashboard.

• Note: Security group policies are shared with members in your project/tenant. If other people already have created the same policy, you can use it.

• Click [Project] -> [Compute] -> [Access & Security] on the navigation bar.

• Click the [Create Security Group] button.

Page 5: K Pre-Post Cloud Tutorial for basic usage · This material explains how to create your first instance with OpenStack dashboard in order to know what OpenStack virtualization is. Also,

5

• Input your security group name to the [Name] field.• We recommend using an understandable name that is distinguished by members.

• For instance, the name should include the service type/purpose (e.g., webserver), username, or date.

• “my-security” is one of bad examples.

• Click the [Create Security Group] button.

Configure a Security Group (2/5)

Bad security name →

Page 6: K Pre-Post Cloud Tutorial for basic usage · This material explains how to create your first instance with OpenStack dashboard in order to know what OpenStack virtualization is. Also,

6

Configure a Security Group (3/5)• Click the [Manage Rules] button corresponding your security group on the list.

• Click the [Add Rule] button.

Page 7: K Pre-Post Cloud Tutorial for basic usage · This material explains how to create your first instance with OpenStack dashboard in order to know what OpenStack virtualization is. Also,

7

• Select the [SSH] item from the [Rule] pull-down menu.

• Click the [Add] button.

Configure a Security Group (4/5)

Page 8: K Pre-Post Cloud Tutorial for basic usage · This material explains how to create your first instance with OpenStack dashboard in order to know what OpenStack virtualization is. Also,

8

• In the security group list, you can see the new rule (SSH) you added.

Configure a Security Group (5/5)

Page 9: K Pre-Post Cloud Tutorial for basic usage · This material explains how to create your first instance with OpenStack dashboard in order to know what OpenStack virtualization is. Also,

9

• The rest of the slides explain how to create an instance using the dashboard.

• Click [Project] -> [Compute] -> [Instances] on the navigation bar.

• Click the [Launch Instance] button.

Create an Instance (1/8)

Page 10: K Pre-Post Cloud Tutorial for basic usage · This material explains how to create your first instance with OpenStack dashboard in order to know what OpenStack virtualization is. Also,

10

• You can see the wizard dialog to create your instance(s).

• In the [Details] step of the wizard, input your instance name to the [Instance Name] field.

• As well as the security group setting, you should use an understandable name because the instance name is shared with members in your project.

Create an Instance (2/8)

Note: If you want to use GPGPU instance, you need to choose appropriate Availability Zone.We provide an additional tutorial to explain how to create a GPGPU instance. Please refer to that.

Default is to use a compute node without GPGPU.

Page 11: K Pre-Post Cloud Tutorial for basic usage · This material explains how to create your first instance with OpenStack dashboard in order to know what OpenStack virtualization is. Also,

11

Create an Instance (3/8)• Select the [Image] item from the [Select Boot Source] pull-down menu.

• Select the [No] button in the [Create New Volume] switch.

• Add an OS image in the [Available] list.

• In this slide, CentOS7 is chosen as you can see in the figure.

← We recommend using “No.”

Select an image

Page 12: K Pre-Post Cloud Tutorial for basic usage · This material explains how to create your first instance with OpenStack dashboard in order to know what OpenStack virtualization is. Also,

12

• Add a flavor from the [Available] list.• Flavor defines a resource size (vCPUs, RAM, local disk size) to allocate an instance.

• In this slide, A2.small is selected as you can see.

Create an Instance (4/8)

Select a flavor

Page 13: K Pre-Post Cloud Tutorial for basic usage · This material explains how to create your first instance with OpenStack dashboard in order to know what OpenStack virtualization is. Also,

13

Create an Instance (5/8)• Add an internal network that connects to your instance.

• Note: The Internal network already has been created by the administrator.

• Add ${project-name}-internal to your instance.

• ${project-name} is the same as your K group name.

• In the figure, we allocated guest-internal as the internal network.

• If your K group name is hp000000, the internal network is hp000000-internal.

Select an internal network

Page 14: K Pre-Post Cloud Tutorial for basic usage · This material explains how to create your first instance with OpenStack dashboard in order to know what OpenStack virtualization is. Also,

14

• Add your security group from the [Available] list.

• Remove the default settings.

Create an Instance (6/8)

Select security group(s)

Page 15: K Pre-Post Cloud Tutorial for basic usage · This material explains how to create your first instance with OpenStack dashboard in order to know what OpenStack virtualization is. Also,

• Add your SSH public key to access your instance.• Tips: You can create a new SSH secret/public keys by

the wizard. However, this slide omits the creating process.

• Click the [Import Key Pair] button.

• Input the [Key Pair Name] and [Public Key] fields.

• Click the [Import Key Pair] button.

• Finally, click the [Launch Instance] button.

15

Create an Instance (7/8)

Page 16: K Pre-Post Cloud Tutorial for basic usage · This material explains how to create your first instance with OpenStack dashboard in order to know what OpenStack virtualization is. Also,

16

• The system will start to launch your instance.

• After [Power Status] changed to Running, your instance is ready.

Create an Instance (8/8)

Page 17: K Pre-Post Cloud Tutorial for basic usage · This material explains how to create your first instance with OpenStack dashboard in order to know what OpenStack virtualization is. Also,

17

• To control your instance using a web browser, Horizon provides a web-based console application over VNC.

• This console seem to be inevitable if you installed Windows on your instance.

• If you can see a login prompt, your instance has been normally launched.

• In this tutorial, you cannot log in to your instance using the console because only public key authentication is permitted in default settings.

Console on the Dashboard

Page 18: K Pre-Post Cloud Tutorial for basic usage · This material explains how to create your first instance with OpenStack dashboard in order to know what OpenStack virtualization is. Also,

18

Assign a Floating IP address to the Instance (1/3)

↓Assign Public IP to this instance

←To the Internet

↑instance

• In the default setting, your instance does not allow users to access from the outside of the internal network.

• To access your instance via the External Network, you need to assign a Public IP (floating IP address) to your instance.

• Select the [Associate Floating IP] item from the pull-down menu.

Page 19: K Pre-Post Cloud Tutorial for basic usage · This material explains how to create your first instance with OpenStack dashboard in order to know what OpenStack virtualization is. Also,

19

Assign a Floating IP address to the Instance (2/3)

↑10.9.1.35 is allocated IP address.

• You can see the [Manage Floating IP Associations] dialog.

• This slide explains to allocate/assign a new floating IP address to your instance.• If your project has unused floating IP addresses, you can use the IP address selected from the pull-down menu.

• At first, click [+] button.

• Select the [External] item in the [Pool] pull-down menu, and then click the [Allocate IP] button. A new IP address will be allocated to your project.

• Select the allocated IP address, and then click [Associate] button.

• Finally, the IP address is assigned to your instance.

Page 20: K Pre-Post Cloud Tutorial for basic usage · This material explains how to create your first instance with OpenStack dashboard in order to know what OpenStack virtualization is. Also,

20

• You can confirm that the floating IP address is assigned to your instance.

• Note: The IP address range is 10.9.0.0/16.

• In this figure, the assigned IP address is 10.9.1.35.

Assign a Floating IP address to the Instance (3/3)

Assigned floating IP address

Page 21: K Pre-Post Cloud Tutorial for basic usage · This material explains how to create your first instance with OpenStack dashboard in order to know what OpenStack virtualization is. Also,

21

• Using an SSH terminal, you can connect your instance with the assigned floating IP address.

• E.g., ssh -i ~/.ssh/{your_secretkey} [email protected]

• If there is no problem, you must be able to connect your instance as shown in the figure.

• Then, you can do anything (e.g., “sudo yum -y update”) as well as an ordinary server.

Access the Instance using SSH (1/2)

Page 22: K Pre-Post Cloud Tutorial for basic usage · This material explains how to create your first instance with OpenStack dashboard in order to know what OpenStack virtualization is. Also,

• Note: The default username depends on the OS image configuration.

• For CentOS

• For Ubuntu

• For CirrOS (pass: cubswin:)), private

22

$ ssh [email protected]

$ ssh [email protected]

$ ssh [email protected]

Access the Instance using SSH (2/2)

Page 23: K Pre-Post Cloud Tutorial for basic usage · This material explains how to create your first instance with OpenStack dashboard in order to know what OpenStack virtualization is. Also,

22

Back up your Instance (1/5)• In K Pre-Post Cloud service, users can use several types of storage from an instance.

• Root disk (ephemeral)

• Uses SSDs with high throughput I/O,

• Is designed for temporary use, and

• Is deleted when the instance is deleted. (= Need for snapshot if needed)

• Volume

• Uses magnetic hard drives,

• Remains after the instance is deleted. (= No need for snapshot)

• If you use the backup function (snapshot) for volume, the backup file size becomes 0 byte.

• This section explains how to use the backup function (snapshot) for an instance with root disk.

Page 24: K Pre-Post Cloud Tutorial for basic usage · This material explains how to create your first instance with OpenStack dashboard in order to know what OpenStack virtualization is. Also,

22

Back up your Instance (2/5)• To safely proceed the backup process, you should shut off your instance before

getting started.

Page 25: K Pre-Post Cloud Tutorial for basic usage · This material explains how to create your first instance with OpenStack dashboard in order to know what OpenStack virtualization is. Also,

22

Back up your Instance (3/5)• Click [Project] -> [Compute] -> [Instances] on the navigation bar.

• Select the [Create Snapshot] item from the pull-down menu.

Page 26: K Pre-Post Cloud Tutorial for basic usage · This material explains how to create your first instance with OpenStack dashboard in order to know what OpenStack virtualization is. Also,

22

Back up your Instance (4/5)• Input a snapshot name in the [Snapshot Name] field.

• We recommend using an understandable name because the snapshot shares with your project member.

• Click the [Create Snapshot] button to start.

Page 27: K Pre-Post Cloud Tutorial for basic usage · This material explains how to create your first instance with OpenStack dashboard in order to know what OpenStack virtualization is. Also,

22

Back up your Instance (5/5)• You can confirm the status of backup processes in your project.

• Click [Project] -> [Compute] -> [Images] on the navigation bar.

• Processing time to back up an instance depends on the root disk size.

• When the backup process is completed, the status is changed to Active.

Page 28: K Pre-Post Cloud Tutorial for basic usage · This material explains how to create your first instance with OpenStack dashboard in order to know what OpenStack virtualization is. Also,

22

Restore your Instance (1/4)• This section explains how to restore your instance from the snapshot image.

• Open the dialog to launch an instance. (see “Create an Instance” section)

• You should select the same Availability Zone you used in the original instance.• nova: if the instance does not use GPGPU.

• gpu-p/v: if the instance uses GPGPU.

Page 29: K Pre-Post Cloud Tutorial for basic usage · This material explains how to create your first instance with OpenStack dashboard in order to know what OpenStack virtualization is. Also,

22

Restore your Instance (2/4)• Select the [Instance Snapshot] item from the [Select Boot Source] pull-down menu.

• To use a root disk (not a volume), click the [No] button in the [Create New Volume] switch.

• Select the snapshot image from the [Available] list.

Page 30: K Pre-Post Cloud Tutorial for basic usage · This material explains how to create your first instance with OpenStack dashboard in order to know what OpenStack virtualization is. Also,

22

Restore your Instance (3/4)• Add a flavor from the [Available] list.

• We recommend using the same flavor that is used in the original instance.

• Especially, if the root disk size in the flavor you choose is smaller than original’s one, the restore process is not guaranteed to work.

Page 31: K Pre-Post Cloud Tutorial for basic usage · This material explains how to create your first instance with OpenStack dashboard in order to know what OpenStack virtualization is. Also,

22

Restore your Instance (4/4)• The rest of the configurations in this dialog are the same as the normal process

previously mentioned in this material (see “Create an Instance” section).

• Finally, click the [Launch Instance] button.

• When the restore process is completed, the status is changed to Running.

• You can assign a new floating IP address to the restored instance.

Page 32: K Pre-Post Cloud Tutorial for basic usage · This material explains how to create your first instance with OpenStack dashboard in order to know what OpenStack virtualization is. Also,

All the OpenStack documentations including manuals are overwhelming volume.

Please refer the following URL.

• Product Document• https://access.redhat.com/documentation/en-us/red_hat_openstack_platform/

• Product Document in Japanese• https://access.redhat.com/documentation/ja-jp/red_hat_openstack_platform/

• OpenStack Community Document (Newton)• https://docs.openstack.org/newton/

• OpenStack Community Document (Newton) in Japanese• https://docs.openstack.org/ja/

23

Other Materials


Recommended