Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

K Pre-Post Cloud Tutorial for basic usage

This is walk-through slides for beginners to explain how to create a instance.

  • Be the first to comment

  • Be the first to like this

K Pre-Post Cloud Tutorial for basic usage

  1. 1. RIKEN R-CCS MARCH 18, 2019 K Pre-Post Cloud Tutorial for basic usage
  2. 2. 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
  3. 3. 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)
  4. 4. 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.
  5. 5. 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 →
  6. 6. 6 Configure a Security Group (3/5) • Click the [Manage Rules] button corresponding your security group on the list. • Click the [Add Rule] button.
  7. 7. 7 • Select the [SSH] item from the [Rule] pull-down menu. • Click the [Add] button. Configure a Security Group (4/5)
  8. 8. 8 • In the security group list, you can see the new rule (SSH) you added. Configure a Security Group (5/5)
  9. 9. 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)
  10. 10. 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.
  11. 11. 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
  12. 12. 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
  13. 13. 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
  14. 14. 14 • Add your security group from the [Available] list. • Remove the default settings. Create an Instance (6/8) Select security group(s)
  15. 15. • 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)
  16. 16. 16 • The system will start to launch your instance. • After [Power Status] changed to Running, your instance is ready. Create an Instance (8/8)
  17. 17. 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
  18. 18. 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.
  19. 19. 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.
  20. 20. 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
  21. 21. 21 • Using an SSH terminal, you can connect your instance with the assigned floating IP address. • E.g., ssh -i ~/.ssh/{your_secretkey} centos@10.9.1.35 • 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)
  22. 22. • Note: The default username depends on the OS image configuration. • For CentOS • For Ubuntu • For CirrOS (pass: cubswin:)), private 22 $ ssh centos@10.9.x.x $ ssh ubuntu@10.9.x.x $ ssh cirros@10.9.x.x Access the Instance using SSH (2/2)
  23. 23. 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.
  24. 24. 22 Back up your Instance (2/5) • To safely proceed the backup process, you should shut off your instance before getting started.
  25. 25. 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.
  26. 26. 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.
  27. 27. 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.
  28. 28. 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.
  29. 29. 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.
  30. 30. 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.
  31. 31. 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.
  32. 32. 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

×