From 7b0e9010cf338e2f11212586dbbc5c4b6e56bfad Mon Sep 17 00:00:00 2001 From: 506487 <506487@mail.muni.cz> Date: Tue, 16 Mar 2021 14:08:46 +0100 Subject: [PATCH] Added image visibility and explanations --- gui/README.md | 99 +++++++++++++++++++---------------------------- network/README.md | 17 ++++++++ 2 files changed, 56 insertions(+), 60 deletions(-) diff --git a/gui/README.md b/gui/README.md index 2c22de4..7fedeca 100644 --- a/gui/README.md +++ b/gui/README.md @@ -3,64 +3,6 @@ The following guide will introduce you to advanced features available in MetaCentrum Cloud. For basic instructions on how to start a virtual machine instance, see [Quick Start](/quick-start/README.md). -## Virtual Networks - -MetaCentrum Cloud offers software-defined networking as one of its services. Users have the ability to create their own -networks and subnets, connect them with routers, and set up tiered network topologies. - -Prerequisites: -* Basic understanding of routing -* Basic understanding of TCP/IP - -For details, refer to [the official documentation](https://docs.openstack.org/horizon/rocky/user/create-networks.html). - -### Create Network - -1. Go to **Project > Network > Networks**, click on **Create Network**. - -2. Choose name and click **Next**. - -3. In the subnet tab, choose a subnet name. In **Network Address Source**, select **Allocate Network Addres from a pool**. - In **Address pool** select any of the available pools. Click **Next**. - -4. Click **Create**. Do not change any other options. - -5. Go to **Project > Network > Network Topology**, review your newly created network topology. - -  - -### Create Router - -1. Go to **Project > Network > Routers**, click on the **Create Router** button. - -2. Choose a name. Select **External Network** and click **Create Router**. - - <div style="border-width:0;border-left:5px solid #b8d6f4;background-color:rgba(228,240,251,0.3);margin:20px 0;padding:10px 20px;font-size:15px;"> - <strong>Notice:</strong><br/> - Please, remember that your will have to allocate floating IP addresses in the selected External Network for all instances - using this router as a gateway. - </div> - -3. Go to **Project > Network > Network Topology**, the newly create router should be now present. - -  - -4. Click on the router icon, select **Add Interface**. - -  - -5. Choose the previously created network/subnet from the drop-down menu. Click **Submit**. - -  - -6. The router is now attached to an external network. - -  - - <div style="border-width:0;border-left:5px solid #b8d6f4;background-color:rgba(228,240,251,0.3);margin:20px 0;padding:10px 20px;font-size:15px;"> - <strong>Notice:</strong><br/> - Routers can also be used to route traffic between internal networks. This is an advanced topic not covered in this guide. - </div> ## Orchestration @@ -101,9 +43,46 @@ os_distro=ubuntu # example 5. OpenStack will resize instance after start. Image shouldn't contain any empty partitions or free space +For mor detailed explanation about CLI work with images, please refer to [https://docs.openstack.org/python-openstackclient/pike/cli/command-objects/image.html](https://docs.openstack.org/python-openstackclient/pike/cli/command-objects/image.html). + + + +## Image visibility +In OpenStack there are 4 possible visibilities of particular image: **public, private, shared, community**. + +### 1. Public image + + **Public image** is an image visible to everyone and everyone can access it. + +### 2. Private image + + **Private image** is an image visible to only to owner of that image. This is default setting for all newly created images. + +### 3. Shared image + + **Shared image** is an image visible to only to owner and possibly certain groups that owner specified. How to share an image between project, please read following [tutorial](/gui/#image-sharing-between-projects) below. + +### 4. Community image + **Community image** is an image that is accesible to everyone, however it is not visible in dashboard. These images can be listed in CLI via command: + + ```openstack image list --community```. + + This is especially beneficial in case of great number of users who should get access to this image or if you own image that is old but some users might still require that image. In that case you can make set old image and **Community image** and set new one as default. + + <div style="border-width:0;border-left:5px solid #b8d6f4;background-color:rgba(255,0,0,0.3);margin:20px 0;padding:10px 20px;font-size:15px;"> + <strong>WARNING:</strong><br/><br/> + To create or upload this image you must have an <b>image_uploader</b> right. + </div> + + Creating a new **Community image** can look like this: + + ```openstack image create --file test-cirros.raw --property hw_scsi_model=virtio-scsi --property hw_disk_bus=scsi --property hw_rng_model=virtio --property hw_qemu_guest_agent=yes --property os_require_quiesce=yes --property os_type=linux --community test-cirros``` + + +For more detailed explanation about these properties, go to the following link: [https://wiki.openstack.org/wiki/Glance-v2-community-image-visibility-design](https://wiki.openstack.org/wiki/Glance-v2-community-image-visibility-design). ## Image sharing between projects -Image sharing allows you to share your image between different projects and then it is possible to launch instances from that image in those projects with other collaborators etc. As mentioned in section about CLI, you will need to use your OpenStack credentials from ```openrc``` or ```cloud.yaml``` file. +Image sharing allows you to share your image between different projects and then it is possible to launch instances from that image in those projects with other collaborators etc. As mentioned in section about CLI, you will need to use your OpenStack credentials from ```openrc``` or ```cloud.yaml``` file. Then to share an image you need to know it's ID, which you can find with command: ``` @@ -154,7 +133,7 @@ openstack image member list <image_ID> When you find ```<ID_project_to_unshare>``` of project, you can cancel access of that project to shared image by command: ``` openstack image remove project <image ID> <ID_project_to_unshare> -``` +``` ## Add SWAP file to instance diff --git a/network/README.md b/network/README.md index 02d3db0..b651489 100644 --- a/network/README.md +++ b/network/README.md @@ -32,6 +32,18 @@ In group project situation is rather different. You cannot use the same approach </div> +#### Virtual Networks + +MetaCentrum Cloud offers software-defined networking as one of its services. Users have the ability to create their own +networks and subnets, connect them with routers, and set up tiered network topologies. + +Prerequisites: +* Basic understanding of routing +* Basic understanding of TCP/IP + +For details, refer to [the official documentation](https://docs.openstack.org/horizon/rocky/user/create-networks.html). + + #### Network creation For group project you need to create internal network first, you may use autoallocated pool for subnet autocreation. @@ -85,6 +97,11 @@ Now you need to attach your internal network to the router.  +<div style="border-width:0;border-left:5px solid #b8d6f4;background-color:rgba(228,240,251,0.3);margin:20px 0;padding:10px 20px;font-size:15px;"> + <strong>Notice:</strong><br/> + Routers can also be used to route traffic between internal networks. This is an advanced topic not covered in this guide. +</div> + #### Associate Floating IP -- GitLab