before changing links
This commit is contained in:
@ -0,0 +1,174 @@
|
||||
How to Create and Configure New Openstack Project Through Horizon on CloudFerro Cloud Cloud[](#how-to-create-and-configure-new-openstack-project-through-horizon-on-brand-name-cloud-name-cloud "Permalink to this headline")
|
||||
==============================================================================================================================================================================================================================
|
||||
|
||||
Default elements of the account[](#default-elements-of-the-account "Permalink to this headline")
|
||||
-------------------------------------------------------------------------------------------------
|
||||
|
||||
When you first create your account at CloudFerro Cloud hosting, default values for the account will be applied. Among others, you will
|
||||
|
||||
> * become owner of a *tenant manager* account and
|
||||
> * have a default project created along with
|
||||
> * three networks and
|
||||
> * two security groups.
|
||||
|
||||
In OpenStack terminology, the role of **tenant manager** is to be an administrator of the account. As a tenant manager, you can
|
||||
|
||||
> * use the account directly but can also
|
||||
> * create other users od the account.
|
||||
|
||||
Before users can start using the account, you have to create project and attach other elements to it: users, groups, roles and so on. Then you invite a user to the organization and they log in with their own login details. There is a catch, though:
|
||||
|
||||
> * new project that the tenant manager creates will **not** have automatically generated **external** network while
|
||||
> * the **allow\_ping\_ssh\_icmp\_rdp** security group will not be generated either.
|
||||
|
||||
In other words, the users of the account won’t have access to the Internet.
|
||||
|
||||
In this article you will see how to overcome these problems.
|
||||
|
||||
Prerequisites[](#prerequisites "Permalink to this headline")
|
||||
-------------------------------------------------------------
|
||||
|
||||
No. 1 **Hosting**
|
||||
|
||||
You need a CloudFerro Cloud hosting account with Horizon interface <https://horizon.cloudferro.com>.
|
||||
|
||||
No. 2 **Introduction to OpenStack Projects**
|
||||
|
||||
The article [What is an OpenStack project on CloudFerro Cloud](../cloud/What-is-an-OpenStack-project-on-CloudFerro-Cloud.html) will define basic elements of an OpenStack project – groups, projects, roles and so on.
|
||||
|
||||
No. 3 **Security groups**
|
||||
|
||||
The article [How to use Security Groups in Horizon on CloudFerro Cloud](../cloud/How-to-use-Security-Groups-in-Horizon-on-CloudFerro-Cloud.html) describes how to create and edit security groups. They enable ports through which the virtual machine communicates with other networks, in particular, with the Internet at large.
|
||||
|
||||
No. 4 **Create network with router**
|
||||
|
||||
Here is how to create a network with router:
|
||||
|
||||
[How to create a network with router in Horizon Dashboard on CloudFerro Cloud](../networking/How-to-create-a-network-with-router-in-Horizon-Dashboard-on-CloudFerro-Cloud.html)
|
||||
|
||||
Default values in the tenant manager account[](#default-values-in-the-tenant-manager-account "Permalink to this headline")
|
||||
---------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
Click on **Network** -> **Networks** and verify the presence of the three default networks. Since the cloud contains number **341** in its name, the networks will have it too: **cloud\_00341\_3** and **eodata\_00341\_**.
|
||||
|
||||

|
||||
|
||||
Note
|
||||
|
||||
This number, **341**, will vary from cloud to cloud and you can see it in the upper left corner of the browser window.
|
||||
|
||||
In particular, two networks that come as default have their names starting with:
|
||||
|
||||
> * **cloud\_00**, the network for internal communication of all the objects in the account
|
||||
> * **eodata\_00**, the network for accessing the Earth Observation Data (images from satellites for you to use)
|
||||
> * The third network is called **external** and has access to the outside world – the Internet, at large.
|
||||
|
||||
Click on option **Network** -> **Security Groups** to verify the presence of two default security groups:
|
||||
|
||||

|
||||
|
||||
The default security groups are:
|
||||
|
||||
> * **default**, the default security group
|
||||
> * **allow\_ping\_ssh\_icmp\_rdp**, to allow access for the usual types of traffic: for the Internet, from Windows to the cloud and so on.
|
||||
|
||||
The former shuts down any communication to the virtual machine for security reasons while the latter opens up only the ports for normal use. In this case, it will be for traffic of types **ping**, **ssh**, **icmp** and **rdp**. Please see Prerequisite No. 3 for definition of those terms.
|
||||
|
||||
Create a New Project[](#create-a-new-project "Permalink to this headline")
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
A project can contain users, groups and their roles so the first step is to define a project and later add users, groups and roles.
|
||||
|
||||
Step 1 Create Project[](#step-1-create-project "Permalink to this headline")
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
Choose **Identity** → **Projects** menu on the left side of the screen.
|
||||
|
||||

|
||||
|
||||
Click on **Create Project** button.
|
||||
|
||||
Complete the project name (this is obligatory) and make sure that checkbox **Enable** is ticked on so that your project becomes active.
|
||||
|
||||

|
||||
|
||||
Next switch on the **Project Members** tab.
|
||||
|
||||

|
||||

|
||||
|
||||
You can add users to project by clicking on “+” icon from the user list.
|
||||
|
||||
It is possible to grant privileges to all of the members in project by selecting proper role from the drop-down menu.
|
||||
|
||||

|
||||
|
||||
Role **member** is the most basic role which has access to most parts of the cloud. Roles starting with *k8s-* are accessing Kubernetes clusters so disregard them if you are not using Kubernetes clusters in your project. For security reasons user types *heat\_stack\_user* and *admin* should **not** be used unless you know what you are doing.
|
||||
|
||||
The last tab, **Project Groups**, allows you to add groups of users with the same privileges.
|
||||
|
||||
To finish setting up a new project, click on the blue **Create Project** button.
|
||||
|
||||
If you have set up the configuration properly, new project should appear in the list. Note the **Project ID** column as it will be needed in the next step.
|
||||
|
||||

|
||||
|
||||
You now have two projects at your disposal:
|
||||
|
||||

|
||||
|
||||
To activate the new project, **testproject**, click on its name. The name of the active project will be available in the upper left corner:
|
||||
|
||||

|
||||
|
||||
As mentioned earlier, your new project will **not** have access to the external network. To verify, choose project, select **Network** -> **Networks** and you will see that the new project has no networks defined.
|
||||
|
||||

|
||||
|
||||
For security groups, the situation is similar: the default one is present, but the **allow\_ping\_ssh\_icmp\_rdp** security group is missing.
|
||||
|
||||
Step 2 Add external network to the project[](#step-2-add-external-network-to-the-project "Permalink to this headline")
|
||||
-----------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
To add external network to such project you must contact Customer Support by creating a ticket. Instructions how to do that are in article [Helpdesk and Support](../accountmanagement/Help-Desk-And-Support.html). The ticket should include project ID from the Projects list. To get the project ID, click on **Project** -> **API Access**
|
||||
|
||||

|
||||
|
||||
and then on button **View Credentials** on the right side. A window with user name, user ID, project name, project ID and authentication URL will appear.
|
||||
|
||||

|
||||
|
||||
Copy those values and put them into the email message in Helpdesk window. Click on button **Create Request** to send it:
|
||||
|
||||

|
||||
|
||||
Step 3 Add security group to the project[](#step-3-add-security-group-to-the-project "Permalink to this headline")
|
||||
-------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
When the support answers, you will see **external** network in the network list. Then create security group and enable ports **22** (SSH) and **3389** (RDP) following the instructions in Prerequisite No. 3. Your security group should look like this:
|
||||
|
||||

|
||||
|
||||
Port 22 will enable SSH access to the instance, while port 3389 will enable access through RDP. SSH and RDP are protocols for accessing a virtual machine from local Linux or Windows machines, respectively.
|
||||
|
||||
Step 4 Create network with router[](#step-4-create-network-with-router "Permalink to this headline")
|
||||
-----------------------------------------------------------------------------------------------------
|
||||
|
||||
The last step is to create a network with a router. See Prerequisite No. 4.
|
||||
|
||||
What To Do Next[](#what-to-do-next "Permalink to this headline")
|
||||
-----------------------------------------------------------------
|
||||
|
||||
Your **testproject** is ready for creating new instances. For example, see articles:
|
||||
|
||||
[How to create a Linux VM and access it from Windows desktop on CloudFerro Cloud](../cloud/How-to-create-a-Linux-VM-and-access-it-from-Windows-desktop-on-CloudFerro-Cloud.html)
|
||||
|
||||
[How to create a Linux VM and access it from Linux command line on CloudFerro Cloud](../cloud/How-to-create-a-Linux-VM-and-access-it-from-Linux-command-line-on-CloudFerro-Cloud.html)
|
||||
|
||||
If you want a new user to have access to **testproject**, the following articles will come handy:
|
||||
|
||||
[Inviting new user to your Organization](../accountmanagement/Inviting-New-User.html).
|
||||
|
||||
[Removing user from Organization](../accountmanagement/Removing-User-From-Organization.html).
|
||||
|
||||
/accountmanagement/Accounts-and-Projects-Management.
|
||||
@ -0,0 +1,49 @@
|
||||
How to access object storage using OpenStack CLI on CloudFerro Cloud[](#how-to-access-object-storage-using-openstack-cli-on-brand-name "Permalink to this headline")
|
||||
=====================================================================================================================================================================
|
||||
|
||||
Cloud computing offers the ability to handle large chunks of data, directly on the remote server. OpenStack module [Swift](https://docs.openstack.org/swift/latest/) was created expressly to enable access to unstructured data that can grow without bounds, with the following design goals in mind :
|
||||
|
||||
> * durability,
|
||||
> * scalability,
|
||||
> * concurrency across the entire data set,
|
||||
> * all while keeping the API simple.
|
||||
|
||||
**Swift** is installed as an independent module but on the syntax level, it is used through the parameters of **openstack** command.
|
||||
|
||||
What We Are Going To Cover[](#what-we-are-going-to-cover "Permalink to this headline")
|
||||
---------------------------------------------------------------------------------------
|
||||
|
||||
> * How to install Swift
|
||||
> * How to connect Swift to OpenStack cloud
|
||||
> * Basic openstack operations with containers
|
||||
> * Basic openstack operations with objects
|
||||
|
||||
Prerequisites[](#prerequisites "Permalink to this headline")
|
||||
-------------------------------------------------------------
|
||||
|
||||
No. 1 **Hosting**
|
||||
|
||||
You need a CloudFerro Cloud hosting account, available at <https://portal.cloudferro.com/>. If you want to follow up with articles about object storage on Horizon, you will this link too: <https://horizon.cloudferro.com>.
|
||||
|
||||
No. 2 **Install or activate openstack command**
|
||||
|
||||
To be able to connect to the cloud, **openstack** command must be operational. If not installed already, use article [How to install OpenStackClient for Linux on CloudFerro Cloud](How-to-install-OpenStackClient-for-Linux-on-CloudFerro-Cloud.html)
|
||||
|
||||
No. 3 **Authenticate to OpenStack using application credentials**
|
||||
|
||||
Then you have to authenticate your account to the cloud. The usual way is to activate **openstack** command using an RC file for on- or two-factor
|
||||
authentication. That will not work in case of Swift module. It is authenticated with application credentials, as explained in article
|
||||
|
||||
[How to generate or use Application Credentials via CLI on CloudFerro Cloud](../cloud/How-to-generate-or-use-Application-Credentials-via-CLI-on-CloudFerro-Cloud.html).
|
||||
|
||||
No. 4 **Familiarity with object storage on** CloudFerro Cloud **OpenStack**
|
||||
|
||||
This article is explaining the basics, using the Horizon interface:
|
||||
|
||||
[How to use Object Storage on CloudFerro Cloud](../s3/How-to-use-Object-Storage-on-CloudFerro-Cloud.html).
|
||||
|
||||
Swift can be understood as the CLI tool for accessing object storage under OpenStack.
|
||||
|
||||
No. 5 **Python installed**
|
||||
|
||||
The following articles contain sections on how to install Python:
|
||||
@ -0,0 +1,107 @@
|
||||
How to Backup an Instance and Download it to the Desktop on CloudFerro Cloud OpenStack Hosting[](#how-to-backup-an-instance-and-download-it-to-the-desktop-on-brand-name-openstack-hosting "Permalink to this headline")
|
||||
=========================================================================================================================================================================================================================
|
||||
|
||||
First, you will need to setup the OpenStack CLI environment on the computer to which you want to download your instance. Depending on the operating system you are using, follow one of the links below:
|
||||
|
||||
[How to install OpenStackClient for Linux on CloudFerro Cloud](How-to-install-OpenStackClient-for-Linux-on-CloudFerro-Cloud.html)
|
||||
|
||||
[How to install OpenStackClient GitBash for Windows on CloudFerro Cloud](How-to-install-OpenStackClient-GitBash-or-Cygwin-for-Windows-on-CloudFerro-Cloud.html)
|
||||
|
||||
Assume that you are
|
||||
|
||||
> * logged into your CloudFerro Cloud hosting account with Horizon interface <https://horizon.cloudferro.com> and that
|
||||
> * you have created an instance called *vm-john-01*.
|
||||
|
||||

|
||||
|
||||
List Instances in Your Project[](#list-instances-in-your-project "Permalink to this headline")
|
||||
-----------------------------------------------------------------------------------------------
|
||||
|
||||
List instances in your project using the following CLI command:
|
||||
|
||||
```
|
||||
user@ubuntu:~$ openstack server list
|
||||
|
||||
```
|
||||
|
||||
This will be the result:
|
||||
|
||||
| | | | | | |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| ID | Name | Status | Networks | Image | Flavor |
|
||||
| 72170eb7-cee4-41a3-beea-c7d208446130 | vm-john-01 | ACTIVE | test\_network=192.168.2.172, 64.225.128.53 | Ubuntu 20.04 LTS | eo1.medium |
|
||||
|
||||
Create a Backup[](#create-a-backup "Permalink to this headline")
|
||||
-----------------------------------------------------------------
|
||||
|
||||
Now you can create a backup from command line interface (CLI) in the terminal (replace **72170eb7-cee4-41a3-beea-c7d208446130** with the ID of your instance):
|
||||
|
||||
```
|
||||
user@ubuntu:~$ openstack server backup create --name backup-01 72170eb7-cee4-41a3-beea-c7d208446130
|
||||
|
||||
```
|
||||
|
||||
Note
|
||||
|
||||
You can also add the **–rotate<count>** parameter to the above command if you want to have control over the number of stored backups:
|
||||
|
||||
```
|
||||
user@ubuntu:~$ openstack server backup create --name backup-01 --rotate 2 72170eb7-cee4-41a3-beea-c7d208446130
|
||||
|
||||
```
|
||||
|
||||
You can see the backup “backup-01” in <https://horizon.cloudferro.com/project/images>
|
||||
|
||||

|
||||
|
||||
or with CLI command:
|
||||
|
||||
```
|
||||
user@ubuntu:~$ openstack image list --private
|
||||
|
||||
```
|
||||
|
||||
The result would be:
|
||||
|
||||
```
|
||||
+--------------------------------------+-----------+--------+
|
||||
| ID | Name | Status |
|
||||
+--------------------------------------+-----------+--------+
|
||||
| 747d720d-a6f4-4554-bf56-16183e5fb7fa | backup-01 | active |
|
||||
+--------------------------------------+-----------+--------+
|
||||
|
||||
```
|
||||
|
||||
Download the Backup File[](#download-the-backup-file "Permalink to this headline")
|
||||
-----------------------------------------------------------------------------------
|
||||
|
||||
Disk image is a raw copy of the hard drive of your virtual machine. You can download it using the following command (replace **72170eb7-cee4-41a3-beea-c7d208446130** with the ID of your disk image):
|
||||
|
||||
```
|
||||
user@ubuntu:~$ openstack image save --file backup-on-the-desktop 747d720d-a6f4-4554-bf56-16183e5fb7fa
|
||||
|
||||
```
|
||||
|
||||
Upload the Backed Up File[](#upload-the-backed-up-file "Permalink to this headline")
|
||||
-------------------------------------------------------------------------------------
|
||||
|
||||
After that, you can upload backup of your file using the Horizon dashboard:
|
||||
|
||||
Go to **Project → Compute → Images**.
|
||||
|
||||

|
||||
|
||||
Click on **“Create Image”**.
|
||||
|
||||

|
||||
|
||||
On this panel you must insert image name, choose backup file and backup format. Next click on “Create Image”.
|
||||
|
||||

|
||||
|
||||
You can also use CLI commands to upload the backup file:
|
||||
|
||||
```
|
||||
user@ubuntu:~$ openstack image create --file path/to/backup <backup_name>
|
||||
|
||||
```
|
||||
@ -0,0 +1,308 @@
|
||||
How to create a set of VMs using OpenStack Heat Orchestration on CloudFerro Cloud[](#how-to-create-a-set-of-vms-using-openstack-heat-orchestration-on-brand-name "Permalink to this headline")
|
||||
===============================================================================================================================================================================================
|
||||
|
||||
Heat is an OpenStack component responsible for Orchestration. Its purpose is to deliver automation engine and optimize processes.
|
||||
|
||||
Heat receives commands through templates which are text files in *yaml* format. A template describes the entire infrastructure that you want to deploy. The deployed environment is called a *stack* and can consist of any combination out of the **102** different resources that are available in OpenStack.
|
||||
|
||||
What We Are Going To Cover[](#what-we-are-going-to-cover "Permalink to this headline")
|
||||
---------------------------------------------------------------------------------------
|
||||
|
||||
> * Typical parts of a Heat template
|
||||
> * Basic template for using Heat
|
||||
> * How to get data for Heat Template
|
||||
> * Using Heat with CLI
|
||||
> * Using Heat with GUI
|
||||
> * More advanced template for Heat
|
||||
|
||||
Prerequisites[](#prerequisites "Permalink to this headline")
|
||||
-------------------------------------------------------------
|
||||
|
||||
No. 1 **Account**
|
||||
|
||||
You need a CloudFerro Cloud hosting account with access to the Horizon interface: <https://horizon.cloudferro.com>.
|
||||
|
||||
No. 2 **Installed Python and its virtualenv**
|
||||
|
||||
If you want to use Heat through CLI commands, Python must be installed and its virtual environment activated. See article [How to install Python virtualenv or virtualenvwrapper on CloudFerro Cloud](../cloud/How-to-install-Python-virtualenv-or-virtualenvwrapper-on-CloudFerro-Cloud.html).
|
||||
|
||||
If you have never installed one of the OpenStack clients, see :[How To Install OpenStack and Magnum Clients for Command Line Interface to CloudFerro Cloud Horizon](../kubernetes/How-To-Install-OpenStack-and-Magnum-Clients-for-Command-Line-Interface-to-CloudFerro-Cloud-Horizon.html).
|
||||
|
||||
Always use the latest value of image id[](#always-use-the-latest-value-of-image-id "Permalink to this headline")
|
||||
-----------------------------------------------------------------------------------------------------------------
|
||||
|
||||
From time to time, the default images of operating systems in the CloudFerro Cloud cloud are upgraded to the new versions. As a consequence, their **image id** will change. Let’s say that the image id for Ubuntu 20.04 LTS was **574fe1db-8099-4db4-a543-9e89526d20ae** at the time of writing of this article. While working through the article, you would normally take the **current** value of image id, and would use it to replace **574fe1db-8099-4db4-a543-9e89526d20ae** throughout the text.
|
||||
|
||||
Now, suppose you wanted to automate processes under OpenStack, perhaps using Heat, Terraform, Ansible or any other tool for OpenStack automation; if you use the value of **574fe1db-8099-4db4-a543-9e89526d20ae** for image id, it would remain **hardcoded** and once this value gets changed during the upgrade, the automated process may stop to execute.
|
||||
|
||||
Warning
|
||||
|
||||
Make sure that your automation code is using the **current value** of an OS image id, not the hardcoded one.
|
||||
|
||||
Basic template for using Heat[](#basic-template-for-using-heat "Permalink to this headline")
|
||||
---------------------------------------------------------------------------------------------
|
||||
|
||||
Using the following snippet, you can create one virtual machine, booted from ephemeral disk. Create a text file called **template.yaml** with your favorite text editor and save it to disk:
|
||||
|
||||
```
|
||||
heat_template_version: 2015-04-30
|
||||
|
||||
resources:
|
||||
instance:
|
||||
type: OS::Nova::Server
|
||||
properties:
|
||||
flavor: eo1.xsmall
|
||||
image: Ubuntu 18.04 LTS
|
||||
networks:
|
||||
- network: <type in your network name here, e.g. cloud_00341_3>
|
||||
- network: <type in your network name here, e.g. eodata_00341_3>
|
||||
key_name: <type in your ssh key name>
|
||||
security_groups:
|
||||
- allow_ping_ssh_icmp_rdp
|
||||
- default
|
||||
|
||||
```
|
||||
|
||||
Important
|
||||
|
||||
*Yaml* format does not allow for tabs, you must enter spaces instead.
|
||||
|
||||
Typical parts of a Heat template[](#typical-parts-of-a-heat-template "Permalink to this headline")
|
||||
---------------------------------------------------------------------------------------------------
|
||||
|
||||
Here are the basic elements of a Heat template:
|
||||
|
||||
**heat\_template\_version**
|
||||
: The exact version of heat template. Each of them varies in many ways (including support for various modules, additional parameters, customization etc). See **Orchestration** -> **Template Versions**.
|
||||
|
||||
**resources**
|
||||
: Entry to commence providing particular components for deployment.
|
||||
|
||||
**instance**
|
||||
: Name of resource (you can type in anything on your own).
|
||||
|
||||
**type**
|
||||
: Definition of an OpenStack component (a comprehensive list is under **Orchestration** -> **Resource Types**)
|
||||
|
||||
**properties**
|
||||
: Required parameters for deploying a component.
|
||||
|
||||
Note
|
||||
|
||||
Your account will normally have a network starting with **cloud\_** but it may also have other networks. In the following examples, we use network called **eodata\_** as an example of an additional network that can be added while creating and using Heat templates.
|
||||
|
||||
How to get data for Heat template[](#how-to-get-data-for-heat-template "Permalink to this headline")
|
||||
-----------------------------------------------------------------------------------------------------
|
||||
|
||||
Templates need data for images, flavor networks, key pairs, security groups and so on. You would normally know all these elements in advance, or you could “look around” at various parts of OpenStack environment:
|
||||
|
||||
| | |
|
||||
| --- | --- |
|
||||
| flavor | **Compute** -> **Instances** -> **Launch Instance** -> **Flavor** |
|
||||
| image | **Compute** -> **Instances** -> **Launch Instance** -> **Source** |
|
||||
| networks | **Network** -> **Networks** -> *cloud* and *eodata* networks for your domain |
|
||||
| key\_name | **Compute** -> **Key Pairs** |
|
||||
| security\_groups | **Network** -> **Security Groups** |
|
||||
|
||||
You can work with Heat in two ways:
|
||||
|
||||
> * through Command Line Interface (CLI), with **python-heatclient** preinstalled and
|
||||
> * interactively, through Horizon commands.
|
||||
|
||||
Using Heat with CLI[](#using-heat-with-cli "Permalink to this headline")
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
Assuming you have
|
||||
|
||||
> * installed Python and
|
||||
> * activated its working environment
|
||||
|
||||
as explained in Prerequisite No. 2, run **pip** command to install **python-heatclient**:
|
||||
|
||||
```
|
||||
pip install python-heatclient
|
||||
|
||||
```
|
||||
|
||||
To run a prepared template in order to deploy a stack, this is what a general command would look like:
|
||||
|
||||
```
|
||||
openstack stack create -t template.yaml <stackname>
|
||||
|
||||
```
|
||||
|
||||
where **-t** assigns template for deployment and **<stackname>** defines name for the stack.
|
||||
|
||||
As a result, a new Stack would be executed and a new instance would be created. For example, the command
|
||||
|
||||
```
|
||||
openstack stack create -t template.yaml heat-test2
|
||||
|
||||
```
|
||||
|
||||
would produce the following output:
|
||||
|
||||

|
||||
|
||||
In Horizon, this is what you would see under **Orchestration** -> **Stacks**:
|
||||
|
||||

|
||||
|
||||
A new instance would be created under **Compute** -> **Instances**:
|
||||
|
||||

|
||||
|
||||
Using Heat with GUI[](#using-heat-with-gui "Permalink to this headline")
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
Log in to the Horizon dashboard, choose **Orchestration** and then **Stacks** tab:
|
||||
|
||||

|
||||
|
||||
Navigate to the right part of the screen, click on button  and bring **Select Template** window to the screen.
|
||||
|
||||
Enroll Template Source selector and choose a particular file, Direct Input or URL to your template.
|
||||
|
||||

|
||||
|
||||
Enter the text of the template you copied from file **template.yaml** directly into the form:
|
||||
|
||||

|
||||
|
||||
Provide a name of your stack and your openstack password:
|
||||
|
||||

|
||||
|
||||
As a result, a new Heat template will have been created:
|
||||
|
||||

|
||||
|
||||
By creating a stack in Horizon you have also executed that template. The result is that a new instance has been created – see it under **Compute** -> **Instances**:
|
||||
|
||||

|
||||
|
||||
We end up with two stacks and two new instances, once using a CLI and the other time, using a GUI.
|
||||
|
||||
Create four VMs using an advanced Heat template[](#create-four-vms-using-an-advanced-heat-template "Permalink to this headline")
|
||||
---------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
In the following example we will attach parameters and then create ResourceGroup with counter, a VM booted from Cinder Volume and several predefined outputs. In parameter **count** we state that we want to generate **4** instances at once, which will yield us the automation that we wanted in the first place. Save the following code as **template4.yaml**:
|
||||
|
||||
```
|
||||
heat_template_version: 2015-04-30
|
||||
|
||||
parameters:
|
||||
key_name:
|
||||
type: string
|
||||
label: sshkey
|
||||
description: SSH key to be used for all instances
|
||||
default: <insert your ssh key name here>
|
||||
image_id:
|
||||
type: string
|
||||
description: Image to be used. Check all available options in Horizon dashboard or, with CLI, use openstack image list command.
|
||||
default: Ubuntu 18.04 LTS
|
||||
private_net_id:
|
||||
type: string
|
||||
description: ID/Name of private network
|
||||
default: <insert your network name here, e.g. cloud_00341_3>
|
||||
|
||||
resources:
|
||||
Group_of_VMs:
|
||||
type: OS::Heat::ResourceGroup
|
||||
properties:
|
||||
count: 4
|
||||
resource_def:
|
||||
type: OS::Nova::Server
|
||||
properties:
|
||||
name: my_vm%index%
|
||||
flavor: eo1.xsmall
|
||||
image: { get_param: image_id }
|
||||
networks:
|
||||
- network: { get_param: private_net_id }
|
||||
key_name: { get_param: key_name }
|
||||
security_groups:
|
||||
- allow_ping_ssh_icmp_rdp
|
||||
- default
|
||||
|
||||
VOL_FAQ:
|
||||
type: OS::Cinder::Volume
|
||||
properties:
|
||||
name: vol
|
||||
size: 20
|
||||
image : { get_param: image_id }
|
||||
|
||||
With_volume:
|
||||
type: OS::Nova::Server
|
||||
properties:
|
||||
flavor: eo1.xsmall
|
||||
block_device_mapping: [{"volume_size": 20, "volume_id": { get_resource: VOL_FAQ }, "delete_on_termination": False, "device_name": "/dev/vda" }]
|
||||
networks:
|
||||
- network: { get_param: private_net_id }
|
||||
key_name: { get_param: key_name }
|
||||
security_groups:
|
||||
- allow_ping_ssh_icmp_rdp
|
||||
- default
|
||||
image : { get_param: image_id }
|
||||
|
||||
outputs:
|
||||
SERVER_DETAILS:
|
||||
description: Shows details of all virtual servers.
|
||||
value: { get_attr: [ Group_of_VMs, show ] }
|
||||
|
||||
```
|
||||
|
||||
The first step is to create a real volume (called VOL\_FAQ) and the second is to create a VM (With\_volume).
|
||||
|
||||
**Explanation**
|
||||
|
||||
**Parameters**
|
||||
: Here you provide default values (**key\_name**, **image\_id**, **private\_net\_id** in this case) and later inject them into resource definitions. The syntax is:
|
||||
|
||||
```
|
||||
{get param: param_name }
|
||||
|
||||
```
|
||||
|
||||
**ResourceGroup**
|
||||
: Component being used for repeating deployment, e.g two identical VM’s.
|
||||
|
||||
**Count**
|
||||
: Defines a variable for iterative operations.
|
||||
|
||||
**resource\_def**
|
||||
: Starting statement for defining group resources.
|
||||
|
||||
**%index%**
|
||||
: This is how you add iterative number to the VM name, increasing values starting from 0.
|
||||
|
||||
**block\_device\_mapping**
|
||||
: Property to define a bootable Cinder volume for instance.
|
||||
|
||||
**outputs**
|
||||
: Additional information concerning deployed elements of the stack. In this case it returns a “show” attribute output. You can examine this kind of information by using openstack stack output list. Available attributes for every component [can be found here.](https://docs.openstack.org/heat/latest/template_guide/openstack.html).
|
||||
|
||||
Execute the template with the following command:
|
||||
|
||||
```
|
||||
openstack stack create -t template4.yaml four
|
||||
|
||||
```
|
||||
|
||||
The name of the stack will be *four*. This is the result in CLI window:
|
||||
|
||||

|
||||
|
||||
Under **Compute** -> **Instance** you would see five new instances created:
|
||||
|
||||

|
||||
|
||||
Four of them have names *my\_vm0*, *my\_vm1*, *my\_vm1* and *my\_vm1*, as defined in line **name: my\_vm%index%** in the template. The fifth is called **four-With\_volume-lrejw222kfvi**. Its name starts the same as the name of the template itself while the rest is automatically generated.
|
||||
|
||||
What To Do Next[](#what-to-do-next "Permalink to this headline")
|
||||
-----------------------------------------------------------------
|
||||
|
||||
You can write your own templates as *yaml* files or you can use option **Orchestration** -> **Template Generator**, which will enable you to enter components in an interactive way:
|
||||
|
||||

|
||||
|
||||
Further explanation of this option is out of scope of this article.
|
||||
@ -0,0 +1,122 @@
|
||||
How to create instance snapshot using OpenStack CLI on CloudFerro Cloud[](#how-to-create-instance-snapshot-using-openstack-cli-on-brand-name "Permalink to this headline")
|
||||
===========================================================================================================================================================================
|
||||
|
||||
In this article, you will learn how to create instance snapshot on CloudFerro Cloud cloud, using OpenStack CLI.
|
||||
|
||||
Instance snapshots allow you to archive the state of the virtual machine. You can, then, use them for
|
||||
|
||||
> * backup,
|
||||
> * migration between clouds
|
||||
> * disaster recovery and/or
|
||||
> * cloning environments for testing or development.
|
||||
|
||||
We cover both types of storage for instances, *ephemeral* and *persistent*.
|
||||
|
||||
The plan[](#the-plan "Permalink to this headline")
|
||||
---------------------------------------------------
|
||||
|
||||
In reality, you will be using the procedures described in this article with the already existing instances.
|
||||
|
||||
However, to get a clear grasp of the process, while following this article you are going to create two new instances, one with *ephemeral* and the other with *persistent* type of storage. Let their names be **instance-which-uses-ephemeral** and **instance-which-uses-volume**. You will create an instance snapshot for each of them.
|
||||
|
||||
If you are only interested in one of these types of instances, you can follow its respective section of this text.
|
||||
|
||||
It goes without saying that after following a section about one type of virtual machine you can clean up the resources you created to, say, save costs.
|
||||
|
||||
Or you can keep them and use them to create an instance out of it using one of articles mentioned in What To Do Next.
|
||||
|
||||
What We Are Going To Cover[](#what-we-are-going-to-cover "Permalink to this headline")
|
||||
---------------------------------------------------------------------------------------
|
||||
|
||||
Prerequisites[](#prerequisites "Permalink to this headline")
|
||||
-------------------------------------------------------------
|
||||
|
||||
No. 1 **Account**
|
||||
|
||||
You need a CloudFerro Cloud hosting account with access to the Horizon interface: <https://horizon.cloudferro.com>.
|
||||
|
||||
No. 2 **Ephemeral storage vs. persistent storage**
|
||||
|
||||
Please see article [Ephemeral vs Persistent storage option Create New Volume on CloudFerro Cloud](../datavolume/Ephemeral-vs-Persistent-storage-option-Create-New-Volume-on-CloudFerro-Cloud.html) to understand the basic difference between ephemeral and persistent types of storage in OpenStack.
|
||||
|
||||
No. 3 **Instance with ephemeral storage**
|
||||
|
||||
You need a virtual machine hosted on CloudFerro Cloud cloud.
|
||||
|
||||
You can create an instance with ephemeral storage by following this article: [How to create a VM using the OpenStack CLI client on CloudFerro Cloud cloud](../cloud/How-to-create-a-VM-using-the-OpenStack-CLI-client-on-CloudFerro-Cloud-cloud.html)
|
||||
|
||||
The actual command used to create an instance from that article was
|
||||
|
||||
```
|
||||
openstack server create \
|
||||
--image Debian-custom-upload \
|
||||
--flavor eo1.small \
|
||||
--key-name ssh-key \
|
||||
--network cloud_00734_1 \
|
||||
--network eodata \
|
||||
--security-group default \
|
||||
--security-group allow_ping_ssh_icmp_rdp \
|
||||
Test-Debian
|
||||
|
||||
```
|
||||
|
||||
In the examples in this article, we are using a default image **Ubuntu 22.04 LTS**.
|
||||
|
||||
With ephemeral storage, only one new instance is created.
|
||||
|
||||
No. 4 **Instance with persistent storage**
|
||||
|
||||
When creating an instance with persistent storage, you just add one new option to the above command; the option is **–boot-from-volume** followed by a
|
||||
|
||||
> * space and the
|
||||
> * desired size of the new volume in gigabytes.
|
||||
|
||||
Make sure to enter the amount of storage sufficient for your needs.
|
||||
|
||||
You can also look at storage size available with your chosen virtual machine flavor for guidance (**openstack flavor list** command, column **Disk**)
|
||||
|
||||
For instance, if you want your boot volume to have 16 GB, add the following:
|
||||
|
||||
```
|
||||
--boot-from-volume 16
|
||||
|
||||
```
|
||||
|
||||
The complete command would, then, look like this:
|
||||
|
||||
```
|
||||
openstack server create \
|
||||
--image Debian-custom-upload \
|
||||
--flavor eo1.small \
|
||||
--key-name ssh-key \
|
||||
--network cloud_00734_1 \
|
||||
--network eodata_00734_1 \
|
||||
--security-group default \
|
||||
--security-group allow_ping_ssh_icmp_rdp \
|
||||
--boot-from-volume 16 \
|
||||
Test-Debian
|
||||
|
||||
```
|
||||
|
||||
In the examples in this article, we are using a default image **Ubuntu 22.04 LTS**.
|
||||
|
||||
With persistent storage, one instance and one volume are created:
|
||||
|
||||
> * a special kind of instance (with no ephemeral storage) and
|
||||
> * the volume that is attached to that instance.
|
||||
|
||||
The instance will boot from the volume that was attached during the creation of instance.
|
||||
|
||||
Otherwise, an instance can have two or more volumes attached to it, however, only one will serve as its boot drive.
|
||||
|
||||
No. 5 **How to delete resources**
|
||||
|
||||
If you want to learn how to delete instances, snapshots, volumes and other OpenStack objects, please have a look at the following articles:
|
||||
|
||||
/networking/How-to-correctly-delete-all-the-resources-in-the-project-via-OpenStack-commandline-Clients-on-CloudFerro-Cloud.
|
||||
|
||||
[How to create or delete volume snapshot on CloudFerro Cloud](../datavolume/How-to-create-or-delete-volume-snapshot-on-CloudFerro-Cloud.html).
|
||||
|
||||
No. 6 **OpenStack CLI client**
|
||||
|
||||
You need to have OpenStack CLI client installed. One of the following articles should help you:
|
||||
@ -0,0 +1,304 @@
|
||||
How to install OpenStackClient GitBash for Windows on CloudFerro Cloud[](#how-to-install-openstackclient-gitbash-for-windows-on-brand-name "Permalink to this headline")
|
||||
=========================================================================================================================================================================
|
||||
|
||||
In this tutorial, you start with a standard Windows installation, then install the OpenStack CLI client and end up connecting to your project on CloudFerro Cloud cloud.
|
||||
|
||||
> For another way of installing OpenStack CLI on Windows, see article [How to install OpenStackClient on Windows using Windows Subsystem for Linux on CloudFerro Cloud OpenStack Hosting](How-to-install-OpenStackClient-on-Windows-using-Windows-Subsystem-for-Linux-on-CloudFerro-Cloud-OpenStack-Hosting.html). However:
|
||||
|
||||
* using Git Bash is simpler than using Windows Subsystem for Linux and is
|
||||
* providing a more straightforward access to your local file system.
|
||||
|
||||
What We Are Going To Cover[](#what-we-are-going-to-cover "Permalink to this headline")
|
||||
---------------------------------------------------------------------------------------
|
||||
|
||||
> * Installing the required software (Python 3, PIP, Git for Windows and the appropriate compilers)
|
||||
> * Creating an isolated Python environment for installing the OpenStack CLI client
|
||||
> * Installing the OpenStack CLI client
|
||||
> * Authenticating the OpenStack CLI client to the cloud
|
||||
> * Executing a simple command to test whether the process was successful
|
||||
|
||||
Prerequisites[](#prerequisites "Permalink to this headline")
|
||||
-------------------------------------------------------------
|
||||
|
||||
No. 1 **Hosting**
|
||||
|
||||
You need a CloudFerro Cloud hosting account with Horizon interface <https://horizon.cloudferro.com>.
|
||||
|
||||
No. 2 **Computer running Microsoft Windows**
|
||||
|
||||
Your computer or virtual machine must be running Microsoft Windows 10 version 1909 or Windows 11. Also, Windows Server 2016, 2019 and 2022 are supported. The reason for that are the requirements of Microsoft Visual Studio.
|
||||
|
||||
Obtaining a valid license for Microsoft C++ Build Tools and other software mentioned here, is outside of scope of this text.
|
||||
|
||||
Installing Microsoft C++ Build Tools, as described in this article, might require more than 10 GiB of hard drive space. The exact amount is subject to change. During this process, make sure that you do not run out of storage.
|
||||
|
||||
No. 3 **Basic knowledge of the Linux terminal**
|
||||
|
||||
You will need basic knowledge of Linux command line.
|
||||
|
||||
No. 4 **RC file downloaded**
|
||||
|
||||
You need to download the RC file from your Horizon dashboard. To do that, follow section **How to download the RC file** of the following article: /gettingstarted/How-to-activate-OpenStack-CLI-access-to-CloudFerro-Cloud-cloud-using-one-or-two-factor-authentication.
|
||||
|
||||
This file must be present on the machine on which you intend to use the OpenStack CLI client.
|
||||
|
||||
Step 1: Download and Install Python[](#step-1-download-and-install-python "Permalink to this headline")
|
||||
--------------------------------------------------------------------------------------------------------
|
||||
|
||||
There are two ways of obtaining Python on CloudFerro Cloud cloud:
|
||||
|
||||
> * It may come preinstalled on virtual machines that were created using one of the default Windows images.
|
||||
> * You may download and install the latest version from the Internet.
|
||||
|
||||
The latter solution will either install Python anew or update the existing installation, so it is still a recommended step.
|
||||
|
||||
If you are going to use your own computer, follow the instructions below if you don’t have Python installed.
|
||||
|
||||
Start your Internet browser and open <https://www.python.org>
|
||||
|
||||
Hover your mouse over the **Downloads** button and choose Windows from the menu that has just appeared.
|
||||
|
||||
Pick up the latest version for Python.
|
||||
|
||||
Download it and run that **.exe** file. Make sure to have options at the bottom of the window selected and click **Customize installation**.
|
||||
|
||||

|
||||
|
||||
In the next screen, select all the **Optional Features**:
|
||||
|
||||

|
||||
|
||||
Click **Next**.
|
||||
|
||||
In the screen **Advanced Options**, select what is selected on the screenshot below and make sure that the installation location is in **Program Files** directory:
|
||||
|
||||

|
||||
|
||||
Click **Install** and wait until the installation is completed:
|
||||
|
||||

|
||||
|
||||
On the last screen, click option **Disable path length limit**:
|
||||
|
||||

|
||||
|
||||
The button **Disable path length limit** should disappear. Click **Close**.
|
||||
|
||||
Open Windows command prompt and execute **python** command in it to check whether the installation was successful. You should see output similar to this:
|
||||
|
||||

|
||||
|
||||
Close the command prompt.
|
||||
|
||||
Step 2: Install Git Bash and pip[](#step-2-install-git-bash-and-pip "Permalink to this headline")
|
||||
--------------------------------------------------------------------------------------------------
|
||||
|
||||
Git Bash for Windows is a set of programs that emulates Linux terminal, allowing you to use common Linux commands **ls**, **source**, **mv** and others.
|
||||
|
||||
It is part of Git for Windows. Download that software from <https://gitforwindows.org> and execute the installer.
|
||||
|
||||
During the installation keep the default options selected.
|
||||
|
||||
After installation, a Git Bash entry should appear in Start menu:
|
||||
|
||||

|
||||
|
||||
Other programs in the suite are Git CMD, Git GUI etc.
|
||||
|
||||
The installation of Python and its suite of programs requires you to additionally install **pip** and update the necessary PythonSSL certificates.
|
||||
|
||||
Step 3: Install pip and update the PythonSSL certificates[](#step-3-install-pip-and-update-the-pythonssl-certificates "Permalink to this headline")
|
||||
----------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
**pip** is a tool for managing and installing Python images.
|
||||
|
||||
Download **get-pip.py** from <https://bootstrap.pypa.io/get-pip.py>. If it opens in your browser as plain text document, right click anywhere on it in the browser and use the **Save as…** or similar option to save it on your computer.
|
||||
|
||||

|
||||
|
||||
Run the script by opening it in **Python**. If **Python** is not the default piece of software used for opening **.py** files on your system, right-click the file and use the **Open with…** or similar option and choose **Python** there.
|
||||
|
||||
It will install **pip**. The installation process can be monitored in a terminal window.
|
||||
|
||||
In order to test whether the installation was successful, use **Start** menu to start **Git Bash** and type the following command:
|
||||
|
||||
```
|
||||
pip -V
|
||||
|
||||
```
|
||||
|
||||
Your output should contain the version of **pip** that you have:
|
||||
|
||||

|
||||
|
||||
Now update PythonSSL certificates that you have on your computer:
|
||||
|
||||
```
|
||||
pip install -U requests[security]
|
||||
|
||||
```
|
||||
|
||||

|
||||
|
||||
Step 4: Install Microsoft C++ Build Tools[](#step-4-install-microsoft-c-build-tools "Permalink to this headline")
|
||||
------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
Microsoft C++ Build Tools are required to install the OpenStack CLI client using **pip** on Windows.
|
||||
|
||||
Enter the following website: <https://visualstudio.microsoft.com/visual-cpp-build-tools/>
|
||||
|
||||
Click **Download Build Tools**. Execute the downloaded **.exe** file.
|
||||
|
||||
During installation, choose the **Desktop development with C++** (which was a correct option at the time of writing):
|
||||
|
||||

|
||||
|
||||
Click **Install**. Wait until the installation process is completed.
|
||||
|
||||
Warning
|
||||
|
||||
The installation process might take a long time.
|
||||
|
||||
Reboot your computer if the installer prompts you to do so.
|
||||
|
||||
Step 5: Install virtualenv and the OpenStack CLI client[](#step-5-install-virtualenv-and-the-openstack-cli-client "Permalink to this headline")
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
**virtualenv** allows you to perform Python operations in an isolated environment. In order to install it, open Git Bash if you previously closed it or rebooted your computer, and execute the following command:
|
||||
|
||||
```
|
||||
pip install virtualenv
|
||||
|
||||
```
|
||||
|
||||
With **cd** command enter the directory in which you want to store the environment in which the OpenStack CLI client will be running. You will need it later on, so make it easily accessible, for example:
|
||||
|
||||
```
|
||||
cd C:/Users/Administrator
|
||||
|
||||
```
|
||||
|
||||
Execute the following command to create the virtual environment **openstack\_cli** which will be used for the OpenStack CLI client:
|
||||
|
||||
```
|
||||
virtualenv openstack_cli
|
||||
|
||||
```
|
||||
|
||||
Note
|
||||
|
||||
You must supply the name of the environment (here, **openstack\_cli**) but what it will be is completely up to you.
|
||||
|
||||
A directory called **openstack\_cli** should appear in the current folder. It will contain files needed for your isolated environment. In order to enter that environment, run **source** command on the **activate** file which is in the **Scripts** folder found in the folder with your virtual environment:
|
||||
|
||||
```
|
||||
source openstack_cli/Scripts/activate
|
||||
|
||||
```
|
||||
|
||||
From now on, the name of your isolated environment - **openstack\_cli** - will be in brackets before each command prompt, indicating that you are inside it.
|
||||
|
||||

|
||||
|
||||
Closing the terminal and reopening will drop you from that environment.
|
||||
|
||||
### How Git Bash terminal commands differ from those in Windows[](#how-git-bash-terminal-commands-differ-from-those-in-windows "Permalink to this headline")
|
||||
|
||||
In GitBash, there are two ways of inserting text from clipboard:
|
||||
|
||||
> * key combination **Shift+Ins** or
|
||||
> * right-click the Git Bash window and select **Paste** from the displayed menu.
|
||||
|
||||
The usual Windows commands such as **CTRL+V** or **CTRL+Shift+V**, **won’t work** in Git Bash window.
|
||||
|
||||
Git Bash emulates UNIX-based systems so while you are in it, use forward slashes and not the typical Windows backward slashes.
|
||||
|
||||
Step 6: Download and prepare jq[](#step-6-download-and-prepare-jq "Permalink to this headline")
|
||||
------------------------------------------------------------------------------------------------
|
||||
|
||||
To authenticate the OpenStack CLI client in the next step, a program called **jq** will be needed. It is a JSON preprocessor, running from command line. To install, navigate to <https://jqlang.github.io/jq/download/> using your Internet browser.
|
||||
|
||||
Download the latest 64-bit executable version of **jq** for Windows.
|
||||
|
||||
A file with **.exe** extension should be downloaded. Rename it to simply **jq** (make sure that it still has the **.exe** extension).
|
||||
|
||||
Navigate to its location using the **cd** command in Git Bash. Do it in a similar way as you would on a Linux command line. Execute the following command:
|
||||
|
||||
```
|
||||
mv jq.exe /usr/bin
|
||||
|
||||
```
|
||||
|
||||
This should allow you to use **jq** with the RC file easily.
|
||||
|
||||
Step 7: Install and configure the OpenStack CLI client[](#step-7-install-and-configure-the-openstack-cli-client "Permalink to this headline")
|
||||
----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
Without leaving Git Bash, while still inside the **openstack\_cli** virtual environment, execute the following command:
|
||||
|
||||
```
|
||||
pip install python-openstackclient
|
||||
|
||||
```
|
||||
|
||||
Wait until the process is completed. As the result, you will be able to run **openstack** command on terminal prompt. It, however, won’t have access to the CloudFerro Cloud cloud, so the next step is to authenticate to the cloud.
|
||||
|
||||
Navigate to the location of the RC file which you downloaded while following Prerequisite No. 4 and execute the **source** command on it. It could look like this (if the name of your RC file is **main-openrc.sh**):
|
||||
|
||||
```
|
||||
source main-openrc.sh
|
||||
|
||||
```
|
||||
|
||||
After that, you will receive the prompt for your password. Enter it and press **Enter** (while typing the password, no characters should appear).
|
||||
|
||||
If your account has two-factor authentication enabled, you will get a prompt for the six-digit code. Enter it and press **Enter**.
|
||||
|
||||
Here is what the two step process of authentication looks like for an RC file called **main-openrc.sh**:
|
||||
|
||||

|
||||
|
||||
On the screenshot above, the username and project name were hidden for privacy reasons.
|
||||
|
||||
In order to test whether the OpenStack CLI client works, list virtual machines you currently operate. The command is:
|
||||
|
||||
```
|
||||
openstack server list
|
||||
|
||||
```
|
||||
|
||||
The output should contain a table containing virtual machines from your project.
|
||||
|
||||
Reentering the Isolated Python Environment[](#reentering-the-isolated-python-environment "Permalink to this headline")
|
||||
-----------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
To run the OpenStack CLI client again, say, after you might have closed the Git Bash window, or have had shut down or restarted Windows, you would have to repeat the same commands you entered above (replace **C:/Users/Administrator** with the path containing your **openstack\_cli** folder).
|
||||
|
||||
```
|
||||
cd C:/Users/Administrator
|
||||
source openstack_cli/Scripts/activate
|
||||
|
||||
```
|
||||
|
||||
After that, execute the **source** command on your RC file in the same way as previously.
|
||||
|
||||
You can also create a batch file to automate reentering the Python environment.
|
||||
|
||||
What To Do Next[](#what-to-do-next "Permalink to this headline")
|
||||
-----------------------------------------------------------------
|
||||
|
||||
The article [How To Install OpenStack and Magnum Clients for Command Line Interface to CloudFerro Cloud Horizon](../kubernetes/How-To-Install-OpenStack-and-Magnum-Clients-for-Command-Line-Interface-to-CloudFerro-Cloud-Horizon.html) will give you another procedure to install CLI and connect it to the cloud. It also contains several examples of using the CLI commands.
|
||||
|
||||
Other articles of interest:
|
||||
|
||||
[How to Create and Configure New Openstack Project Through Horizon on CloudFerro Cloud Cloud](How-To-Create-and-Configure-New-Project-on-CloudFerro-Cloud-Cloud.html)
|
||||
|
||||
[How to create a set of VMs using OpenStack Heat Orchestration on CloudFerro Cloud](How-to-create-a-set-of-VMs-using-OpenStack-Heat-Orchestration-on-CloudFerro-Cloud.html)
|
||||
|
||||
Using CLI interface for Kubernetes clusters:
|
||||
|
||||
[How To Use Command Line Interface for Kubernetes Clusters On CloudFerro Cloud OpenStack Magnum](../kubernetes/How-To-Use-Command-Line-Interface-for-Kubernetes-Clusters-On-CloudFerro-Cloud-OpenStack-Magnum.html)
|
||||
|
||||
Also see
|
||||
|
||||
[How to activate OpenStack CLI access to CloudFerro Cloud cloud using one- or two-factor authentication](../accountmanagement/How-to-activate-OpenStack-CLI-access-to-CloudFerro-Cloud-cloud-using-one-or-two-factor-authentication.html)
|
||||
@ -0,0 +1,29 @@
|
||||
How to install OpenStackClient for Linux on CloudFerro Cloud[](#how-to-install-openstackclient-for-linux-on-brand-name "Permalink to this headline")
|
||||
=====================================================================================================================================================
|
||||
|
||||
The OpenStack CLI client allows you to manage OpenStack environments using the command line interface. Its functions include:
|
||||
|
||||
> * Creating, starting, shutting down, shelving, deleting, rebooting virtual machines
|
||||
> * Assigning a floating IP to your virtual machine
|
||||
> * Listing available resources, including volumes, virtual machines and floating IPs
|
||||
|
||||
You can also automate these operations using scripts.
|
||||
|
||||
This article covers two methods of installing this piece of software on Ubuntu. The first method should be more convenient and sufficient for most needs. The second method is for advanced use cases, such as:
|
||||
|
||||
> * keeping multiple versions of the OpenStack CLI client ready to use on the same computer or
|
||||
> * needing more advanced features than what Ubuntu packages provide and
|
||||
> * having to use the OpenStack CLI client on a Linux distribution which does not support the installation method described in the first method.
|
||||
|
||||
Prerequisites[](#prerequisites "Permalink to this headline")
|
||||
-------------------------------------------------------------
|
||||
|
||||
No. 1 **Hosting**
|
||||
|
||||
You need a CloudFerro Cloud hosting account with Horizon interface <https://horizon.cloudferro.com>.
|
||||
|
||||
No. 2 **Linux installed on your computer**
|
||||
|
||||
You need to have Linux installed on your local computer or a virtual machine. This article was written for Ubuntu 22.04 LTS and Python 3. Instructions for other Linux distributions might be different.
|
||||
|
||||
If you choose a virtual machine, you can run it yourself, or it can be, say, a virtual machine running on CloudFerro Cloud cloud. If you choose this latter option, the following articles might be of help for you:
|
||||
@ -0,0 +1,305 @@
|
||||
How to install OpenStackClient on Windows using Windows Subsystem for Linux on CloudFerro Cloud OpenStack Hosting[](#how-to-install-openstackclient-on-windows-using-windows-subsystem-for-linux-on-brand-name-openstack-hosting "Permalink to this headline")
|
||||
===============================================================================================================================================================================================================================================================
|
||||
|
||||
In this tutorial, you will control your OpenStack environment in a deeper and more precise way using the CLI (Command Line Interface). Of course, you can use the Horizon GUI (Graphical User Interface) running in your browser, but the CLI includes additional features like the ability to use scripts for more automated management of your environment.
|
||||
|
||||
The instructions for installing Windows Subsystem for Linux are based on the official Windows documentation found at <https://learn.microsoft.com/en-us/windows/wsl/>.
|
||||
|
||||
What We Are Going To Cover[](#what-we-are-going-to-cover "Permalink to this headline")
|
||||
---------------------------------------------------------------------------------------
|
||||
|
||||
> * Installing Windows Subsystem for Linux on Microsoft Windows
|
||||
> * Installing the OpenStack CLI client and authenticating
|
||||
|
||||
Prerequisites[](#prerequisites "Permalink to this headline")
|
||||
-------------------------------------------------------------
|
||||
|
||||
No. 1 **Hosting**
|
||||
|
||||
You need a CloudFerro Cloud hosting account with Horizon interface <https://horizon.cloudferro.com>.
|
||||
|
||||
No. 2 **Computer running Microsoft Windows**
|
||||
|
||||
Your computer must be running Microsoft Windows. This article is written for Windows Server 2019 version 1709 or later. The instructions for the following versions are linked in the appropriate location of this article:
|
||||
|
||||
> * Windows 10 version 1903 up to and excluding version 2004
|
||||
> * Windows 10 version 2004 or later (Build 19041), Windows 11
|
||||
> * Windows Server 2022
|
||||
|
||||
No. 3 **Optional – software for 2FA authentication**
|
||||
|
||||
Your account at CloudFerro Cloud cloud may have two-factor authentication enabled. It means that apart from the usual username and password combination, you also need software to generate the TOTP – the six-digit code for the additional, second step of authentication. This article will provide additional technical details: [How to activate OpenStack CLI access to CloudFerro Cloud cloud using one- or two-factor authentication](../accountmanagement/How-to-activate-OpenStack-CLI-access-to-CloudFerro-Cloud-cloud-using-one-or-two-factor-authentication.html).
|
||||
|
||||
Step 1: Check the version of Windows[](#step-1-check-the-version-of-windows "Permalink to this headline")
|
||||
----------------------------------------------------------------------------------------------------------
|
||||
|
||||
Right-click on your start menu and left-click “System”.
|
||||
|
||||
A screen will appear in which you will see the version of your Microsoft Windows operating system. Memorize it or write it somewhere down.
|
||||
|
||||
Step 2: Install Ubuntu on Windows Subsystem for Linux[](#step-2-install-ubuntu-on-windows-subsystem-for-linux "Permalink to this headline")
|
||||
--------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
Note
|
||||
|
||||
The following instructions from this step are for Windows Server 2019 version 1709 or later. If you are running a different operating system, please follow the instructions found under the appropriate link and skip to Step 3:
|
||||
|
||||
> * Windows Server 2022 - <https://learn.microsoft.com/en-us/windows/wsl/install-on-server> section **Install WSL on Windows Server 2022**
|
||||
> * Windows 10 version 1903 up to and excluding version 2004 - <https://learn.microsoft.com/en-us/windows/wsl/install-manual>
|
||||
> * Windows 10 version 2004 or later (Build 19041), Windows 11 - <https://learn.microsoft.com/en-us/windows/wsl/install>
|
||||
|
||||
Enter the following website: <https://learn.microsoft.com/en-us/windows/wsl/install-manual#downloading-distributions>. Download Ubuntu 20.04 using the provided link. This tutorial assumes that your browser saved it in your **Downloads** directory - if that is not the case, please modify the instructions accordingly.
|
||||
|
||||
Locate the downloaded file:
|
||||
|
||||

|
||||
|
||||
Right-click it and select the option **Rename**.
|
||||
|
||||

|
||||
|
||||
Rename the downloaded file to **Ubuntu.zip**:
|
||||
|
||||

|
||||
|
||||
Right-click the file and select **Extract All…**.
|
||||
|
||||

|
||||
|
||||
In the wizard that appeared do not change any options and click **Extract**:
|
||||
|
||||

|
||||
|
||||
A directory called **Ubuntu** should have appeared:
|
||||
|
||||

|
||||
|
||||
Enter that folder and view its content:
|
||||
|
||||

|
||||
|
||||
Memorize or write somewhere down the name of the **.appx** file which ends with **x64**.
|
||||
|
||||
Open your **Start** menu. Right-click the entry **Windows PowerShell** and select **Run as administrator**:
|
||||
|
||||

|
||||
|
||||
In the displayed window type the following command and press Enter:
|
||||
|
||||
```
|
||||
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
|
||||
|
||||
```
|
||||
|
||||
The following progress bar should have appeared:
|
||||
|
||||

|
||||
|
||||
After the end of the process you will be asked if you want to restart your computer to complete the operation:
|
||||
|
||||

|
||||
|
||||
Make sure that the restart will not cause any disruptions and press **Y** to restart.
|
||||
|
||||
During the reboot you will see the following process message:
|
||||
|
||||

|
||||
|
||||
Once the reboot is completed, start the PowerShell again as described previously.
|
||||
|
||||
Run the following command (replace **Ubuntu.appx** with the name of your **.appx** file which you memorized or wrote somewhere down previously):
|
||||
|
||||
```
|
||||
Add-AppxPackage .\Downloads\Ubuntu\Ubuntu.appx
|
||||
|
||||
```
|
||||
|
||||
During the process, you will see the status bar similar to this:
|
||||
|
||||

|
||||
|
||||
Once the process is finished, execute the following command (replace the **C:\Users\Administrator\Ubuntu** path with the location of your **Ubuntu** folder):
|
||||
|
||||
```
|
||||
$userenv = [System.Environment]::GetEnvironmentVariable("Path", "User")
|
||||
[System.Environment]::SetEnvironmentVariable("PATH", $userenv + ";C:\Users\Administrator\Ubuntu", "User")
|
||||
|
||||
```
|
||||
|
||||
Your newly installed Ubuntu should appear in your **Start** menu:
|
||||
|
||||

|
||||
|
||||
Run it. You will see the following message:
|
||||
|
||||

|
||||
|
||||
Wait until this process finishes. After that, you will get a prompt asking you for your desired username (which is to be used in the installed Ubuntu):
|
||||
|
||||

|
||||
|
||||
Type it and press Enter. You will now be asked to provide the password for that account:
|
||||
|
||||

|
||||
|
||||
Note
|
||||
|
||||
Your password will not be visible as you type, not even as masking characters.
|
||||
|
||||
Input your password and press Enter. You will then be asked to type it again:
|
||||
|
||||

|
||||
|
||||
If you typed the same password twice, it will be set as the password for that account. You wil get the following message as confirmation:
|
||||
|
||||

|
||||
|
||||
Wait for a short time. Eventually your Linux environment will be ready:
|
||||
|
||||

|
||||
|
||||
Step 3: Install OpenStack CLI in an isolated Python environment[](#step-3-install-openstack-cli-in-an-isolated-python-environment "Permalink to this headline")
|
||||
----------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
Now that you have installed Windows Subsystem on Linux running Ubuntu on your Windows computer, it is time to install OpenStack CLI.
|
||||
|
||||
Update the software running on your Ubuntu:
|
||||
|
||||
```
|
||||
sudo apt update && sudo apt upgrade
|
||||
|
||||
```
|
||||
|
||||
Once the process is finished, install the **python3-venv** package to create a separate Python environment:
|
||||
|
||||
```
|
||||
sudo apt install python3-venv
|
||||
|
||||
```
|
||||
|
||||
Create a virtual environment in which you will have OpenStack CLI installed:
|
||||
|
||||
```
|
||||
python3 -m venv openstack_cli
|
||||
|
||||
```
|
||||
|
||||
Enter your new virtual environment:
|
||||
|
||||
```
|
||||
source openstack_cli/bin/activate
|
||||
|
||||
```
|
||||
|
||||
Upgrade **pip** to the latest version:
|
||||
|
||||
```
|
||||
pip install --upgrade pip
|
||||
|
||||
```
|
||||
|
||||
Install the **python-openstackclient** package:
|
||||
|
||||
```
|
||||
pip install python-openstackclient
|
||||
|
||||
```
|
||||
|
||||
Verify that the OpenStack CLI works by viewing its help:
|
||||
|
||||
```
|
||||
openstack --help
|
||||
|
||||
```
|
||||
|
||||
If the command shows its output using a pager, you should be able to use the arrows (or vim keys - **J** and **K**) to scroll and **Q** to exit.
|
||||
|
||||
If everything seems to work, time to move to the next step - authentication to your user account on CloudFerro Cloud.
|
||||
|
||||
Step 4: Download your OpenStack RC File[](#step-4-download-your-openstack-rc-file "Permalink to this headline")
|
||||
----------------------------------------------------------------------------------------------------------------
|
||||
|
||||
Login to CloudFerro Cloud hosting account with Horizon interface <https://horizon.cloudferro.com>.
|
||||
|
||||
Click on your username in the upper right corner. You will see the following menu:
|
||||
|
||||

|
||||
|
||||
If your account has two factor authentication enabled, click the option **OpenStack RC File (2FA)**. If, however, it does not have it enabled, use the **OpenStack RC File** option.
|
||||
|
||||
The RC file will be downloaded. Memorize or write somewhere down the name of that file. Move this file to the root location of your **C:** drive.
|
||||
|
||||
Step 5: Move the RC file to your Ubuntu environment[](#step-5-move-the-rc-file-to-your-ubuntu-environment "Permalink to this headline")
|
||||
----------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
Return to your **Ubuntu** window.
|
||||
|
||||
You will now copy your RC file to your Ubuntu environment. Since Windows Subsystem for Linux mounts the **C:** drive under **/mnt/c**, the command for copying your RC file to your Ubuntu environment is as follows (replace **main-openrc.sh** with the name of your RC file):
|
||||
|
||||
```
|
||||
cp /mnt/c/main-openrc.sh $HOME
|
||||
|
||||
```
|
||||
|
||||
If your account uses two-factor authentication, you will need **jq** to activate access to your cloud environment. To install **jq**, execute:
|
||||
|
||||
```
|
||||
sudo apt install -y jq
|
||||
|
||||
```
|
||||
|
||||
Now use the **source** command on this file to begin the authentication process (replace **main-rc.sh** with the name of your RC file):
|
||||
|
||||
```
|
||||
source main-openrc.sh
|
||||
|
||||
```
|
||||
|
||||
You will see the prompt for password to your CloudFerro Cloud account. Type your password there and press Enter (the password is still being accepted even if you do not see the characters being typed).
|
||||
|
||||
If your account has two factor authentication enabled, you will also see the prompt for your six-digit code. Open software which you use for generating such codes (for example KeePassXC or FreeOTP) and find your code there, as usual. Make sure that you enter it before it expires. If you think that you will not manage to enter your current code, wait until a new one is generated.
|
||||
|
||||
After having entered your code, press Enter.
|
||||
|
||||
Now you can test whether you have successfully authenticated by listing your VMs:
|
||||
|
||||
```
|
||||
openstack server list
|
||||
|
||||
```
|
||||
|
||||
How to run this environment later?[](#how-to-run-this-environment-later "Permalink to this headline")
|
||||
------------------------------------------------------------------------------------------------------
|
||||
|
||||
If you close the window with Ubuntu and reopen it, you will see that you are no longer in the **openstack\_cli** environment you created and thus no longer have access to OpenStack. You will need to reenter the **openstack\_cli** environment and reauthenticate.
|
||||
|
||||
After reopening the Ubuntu Window, execute the **source** command on the file used for entering you **openstack\_cli** environment, just like previously:
|
||||
|
||||
```
|
||||
source openstack_cli/bin/activate
|
||||
|
||||
```
|
||||
|
||||
Now, reauthenticate by invoking the **source** comand on your **RC** file (replace **main-openrc.sh** with the name of your RC file):
|
||||
|
||||
```
|
||||
source main-openrc.sh
|
||||
|
||||
```
|
||||
|
||||
Type your password and press Enter. You should now be able execute the OpenStack CLI commands as usual.
|
||||
|
||||
What To Do Next[](#what-to-do-next "Permalink to this headline")
|
||||
-----------------------------------------------------------------
|
||||
|
||||
After installing the OpenStack CLI client and activating your new RC file, you can use other articles to perform operations on CloudFerro Cloud cloud:
|
||||
|
||||
[How to create a set of VMs using OpenStack Heat Orchestration on CloudFerro Cloud](How-to-create-a-set-of-VMs-using-OpenStack-Heat-Orchestration-on-CloudFerro-Cloud.html)
|
||||
|
||||
[Generating and authorizing Terraform using Keycloak user on CloudFerro Cloud](../openstackdev/Generating-and-authorizing-Terraform-using-Keycloak-user-on-CloudFerro-Cloud.html)
|
||||
|
||||
[How to upload your custom image using OpenStack CLI on CloudFerro Cloud](../cloud/How-to-upload-your-custom-image-using-OpenStack-CLI-on-CloudFerro-Cloud.html)
|
||||
|
||||
[How to create a VM using the OpenStack CLI client on CloudFerro Cloud cloud](../cloud/How-to-create-a-VM-using-the-OpenStack-CLI-client-on-CloudFerro-Cloud-cloud.html)
|
||||
|
||||
[How To Use Command Line Interface for Kubernetes Clusters On CloudFerro Cloud OpenStack Magnum](../kubernetes/How-To-Use-Command-Line-Interface-for-Kubernetes-Clusters-On-CloudFerro-Cloud-OpenStack-Magnum.html)
|
||||
@ -0,0 +1,17 @@
|
||||
How to move data volume between VMs using OpenStack CLI on CloudFerro Cloud[](#how-to-move-data-volume-between-vms-using-openstack-cli-on-brand-name "Permalink to this headline")
|
||||
===================================================================================================================================================================================
|
||||
|
||||
Volumes are used to store data and those data can be accessed from a virtual machine to which the volume is attached. To access data stored on a volume from another virtual machine, you need to disconnect that volume from virtual machine to which it is currently connected, and connect it to another instance.
|
||||
|
||||
This article uses OpenStack CLI client to transfer volumes between virtual machines which are in the same project.
|
||||
|
||||
Prerequisites[](#prerequisites "Permalink to this headline")
|
||||
-------------------------------------------------------------
|
||||
|
||||
No. 1 **Hosting**
|
||||
|
||||
You need a CloudFerro Cloud hosting account with Horizon interface <https://horizon.cloudferro.com>.
|
||||
|
||||
No. 2 **OpenStack CLI client**
|
||||
|
||||
To be able to use the OpenStack CLI client, you need to have it installed. One of these articles should help:
|
||||
@ -0,0 +1,382 @@
|
||||
How to share private container from object storage to another user on CloudFerro Cloud[](#how-to-share-private-container-from-object-storage-to-another-user-on-brand-name "Permalink to this headline")
|
||||
=========================================================================================================================================================================================================
|
||||
|
||||
You can create your own private containers in Object Store of your projects and you can grant access to other users.
|
||||
|
||||
If you want to limit the access for chosen users to specific containers, the other users have to be the members of other projects (it is recommended one user or group of users per one project).
|
||||
|
||||
The project can be in one or more domains.
|
||||
|
||||
Otherwise, if users are members of the same project, they see all containers in that project and you cannot limit access to specific containers.
|
||||
|
||||
Prerequisites[](#prerequisites "Permalink to this headline")
|
||||
-------------------------------------------------------------
|
||||
|
||||
No. 1 **Hosting**
|
||||
|
||||
You need a CloudFerro Cloud hosting account with Horizon interface <https://horizon.cloudferro.com>.
|
||||
|
||||
No. 2 **OpenStack client installed and connected to the cloud**
|
||||
|
||||
The following article will help you install Python and OpenStack client called **openstack** and will also help you connect to the cloud [How to install OpenStackClient for Linux on CloudFerro Cloud](How-to-install-OpenStackClient-for-Linux-on-CloudFerro-Cloud.html)).
|
||||
|
||||
No. 3 **Knowledge of downloading and working with RC files**
|
||||
|
||||
To be able to share private containers, you will have to manipulate RC files from the cloud. The following article will provide technical details:
|
||||
|
||||
[How to activate OpenStack CLI access to CloudFerro Cloud cloud using one- or two-factor authentication](../accountmanagement/How-to-activate-OpenStack-CLI-access-to-CloudFerro-Cloud-cloud-using-one-or-two-factor-authentication.html)
|
||||
|
||||
No. 4. **Using OpenStack Swift module**
|
||||
|
||||
The OpenStack Object Store module, known as *Swift*, allows you to store and retrieve data with a simple API. It’s built for scale and is optimized for durability, availability, and concurrency across the entire data set. Swift is ideal for storing unstructured data that can grow without bound.
|
||||
|
||||
See [How to access object storage using OpenStack CLI on CloudFerro Cloud](How-to-access-object-storage-using-OpenStack-CLI-on-CloudFerro-Cloud.html)
|
||||
|
||||
Setting up the test example[](#setting-up-the-test-example "Permalink to this headline")
|
||||
-----------------------------------------------------------------------------------------
|
||||
|
||||
In the example below there are three projects:
|
||||
|
||||
1. “main”,
|
||||
2. “project\_1”,
|
||||
3. “project\_2”.
|
||||
|
||||

|
||||
|
||||
… and three users:
|
||||
|
||||
All clouds
|
||||
|
||||
1. “owner” - the user with **member** role in project “main”,
|
||||
2. “user\_1” - the user with **member** role in project “project\_1”,
|
||||
3. “user\_2” - the user with **member** role in project “project\_2”.
|
||||
|
||||

|
||||
|
||||
The user “owner” has three containers in their project “main”…
|
||||
|
||||
1. c-main-a,
|
||||
2. c-main-b,
|
||||
3. c-main-d.
|
||||
|
||||

|
||||
|
||||
…and the following files in the containers:
|
||||
|
||||
* c-main-a
|
||||
|
||||
+ test-main-a1.txt
|
||||
+ test-main-a2.txt
|
||||
* c-main-b
|
||||
|
||||
+ test-main-b.txt
|
||||
* c-main-d
|
||||
|
||||
+ test-main-d.txt
|
||||
|
||||
In the example below, the user “owner” will grant “read only” access to container “c-main-a” for “user\_1”
|
||||
|
||||
Download the RC file to share permissions with users[](#download-the-rc-file-to-share-permissions-with-users "Permalink to this headline")
|
||||
-------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
Firstly, the user “owner” should login to their domain if they didn’t do it yet:
|
||||
|
||||

|
||||
|
||||
Then, they should choose the main project:
|
||||
|
||||

|
||||
|
||||
After that, they should download the “OpenStack RC File” for the user “owner” and the project “main”:
|
||||
|
||||

|
||||
|
||||
Note
|
||||
|
||||
We shall assume the simplest case in which all three users have access to the cloud with one-factor authentication. If two-factor authentication is enabled, then the owner will have to share the six-digit code that is needed for the second factor of authentication.
|
||||
|
||||
You can preview the content of that file in your Linux terminal:
|
||||
|
||||
```
|
||||
$ cat main-openrc.sh
|
||||
|
||||
```
|
||||
|
||||
**main-openrc.sh**
|
||||
|
||||
```
|
||||
#!/usr/bin/env bash
|
||||
# To use an OpenStack cloud you need to authenticate against the Identity
|
||||
# service named keystone, which returns a **Token** and **Service Catalog**.
|
||||
# The catalog contains the endpoints for all services the user/tenant has
|
||||
# access to - such as Compute, Image Service, Identity, Object Storage, Block
|
||||
# Storage, and Networking (code-named nova, glance, keystone, swift,
|
||||
# cinder, and neutron).
|
||||
#
|
||||
# *NOTE*: Using the 3 *Identity API* does not necessarily mean any other
|
||||
# OpenStack API is version 3. For example, your cloud provider may implement
|
||||
# Image API v1.1, Block Storage API v2, and Compute API v2.0. OS_AUTH_URL is
|
||||
# only for the Identity API served through keystone.
|
||||
unset OS_TENANT_ID
|
||||
unset OS_TENANT_NAME
|
||||
export OS_AUTH_URL=https://keystone.cloudferro.com:5000/v3
|
||||
export OS_INTERFACE=public
|
||||
export OS_IDENTITY_API_VERSION=3
|
||||
export OS_USERNAME="owner"
|
||||
export OS_REGION_NAME="WAW3-1"
|
||||
export OS_PROJECT_ID=ab0c8e1710854b92b0be2b40b31a615a
|
||||
export OS_PROJECT_NAME="main_project"
|
||||
export OS_PROJECT_DOMAIN_ID="119f4676f307434eaf28daab5ba3cc92"
|
||||
if [ -z "$OS_REGION_NAME" ]; then unset OS_REGION_NAME; fi
|
||||
if [ -z "$OS_USER_DOMAIN_NAME" ]; then unset OS_USER_DOMAIN_NAME; fi
|
||||
if [ -z "$OS_PROJECT_DOMAIN_ID" ]; then unset OS_PROJECT_DOMAIN_ID; fi
|
||||
echo "Please enter your OpenStack Password for project $OS_PROJECT_NAME as user $OS_USERNAME: "
|
||||
read -sr OS_PASSWORD_INPUT
|
||||
export OS_PASSWORD=$OS_PASSWORD_INPUT
|
||||
export OS_AUTH_TYPE=password
|
||||
export OS_USER_DOMAIN_NAME="cloud_00373" # ****IF THIS LINE IS MISSING IN YOUR FILE PLEASE ADD IT!!!****
|
||||
|
||||
```
|
||||
|
||||
Sharing the RC file with the users[](#sharing-the-rc-file-with-the-users "Permalink to this headline")
|
||||
-------------------------------------------------------------------------------------------------------
|
||||
|
||||
Copy the file **main-openrc.sh** to your CLI directory.
|
||||
|
||||
The user called “user\_1” should do the same procedure:
|
||||
|
||||
1. login to their “project\_1”
|
||||
2. download the “OpenStack RC File” for user “user\_1” and project “project\_1”
|
||||
|
||||
project\_1-openrc.sh
|
||||
|
||||
```
|
||||
#!/usr/bin/env bash
|
||||
# To use an OpenStack cloud you need to authenticate against the Identity
|
||||
# service named keystone, which returns a **Token** and **Service Catalog**.
|
||||
# The catalog contains the endpoints for all services the user/tenant has
|
||||
# access to - such as Compute, Image Service, Identity, Object Storage, Block
|
||||
# Storage, and Networking (code-named nova, glance, keystone, swift,
|
||||
# cinder, and neutron).
|
||||
#
|
||||
# *NOTE*: Using the 3 *Identity API* does not necessarily mean any other
|
||||
# OpenStack API is version 3. For example, your cloud provider may implement
|
||||
# Image API v1.1, Block Storage API v2, and Compute API v2.0. OS_AUTH_URL is
|
||||
# only for the Identity API served through keystone.
|
||||
unset OS_TENANT_ID
|
||||
unset OS_TENANT_NAME
|
||||
export OS_AUTH_URL=https://keystone.cloudferro.com:5000/v3
|
||||
export OS_INTERFACE=public
|
||||
export OS_IDENTITY_API_VERSION=3
|
||||
export OS_USERNAME="user_1"
|
||||
export OS_REGION_NAME="WAW3-1"
|
||||
export OS_PROJECT_ID=4d488c376c0b4bc79a60b56bc72834e8
|
||||
export OS_PROJECT_NAME="p_project_1"
|
||||
export OS_PROJECT_DOMAIN_ID="119f4676f307434eaf28daab5ba3cc92"
|
||||
if [ -z "$OS_REGION_NAME" ]; then unset OS_REGION_NAME; fi
|
||||
if [ -z "$OS_USER_DOMAIN_NAME" ]; then unset OS_USER_DOMAIN_NAME; fi
|
||||
if [ -z "$OS_PROJECT_DOMAIN_ID" ]; then unset OS_PROJECT_DOMAIN_ID; fi
|
||||
echo "Please enter your OpenStack Password for project $OS_PROJECT_NAME as user $OS_USERNAME: "
|
||||
read -sr OS_PASSWORD_INPUT
|
||||
export OS_PASSWORD=$OS_PASSWORD_INPUT
|
||||
export OS_AUTH_TYPE=password
|
||||
export OS_USER_DOMAIN_NAME="cloud_00373" # ****IF THIS LINE IS MISSING IN YOUR FILE PLEASE ADD IT!!!****
|
||||
|
||||
```
|
||||
|
||||
The called “user\_2” should do the same procedure as above.
|
||||
|
||||
Owner sources the RC file[](#owner-sources-the-rc-file "Permalink to this headline")
|
||||
-------------------------------------------------------------------------------------
|
||||
|
||||
Now, each user should open their terminal and source the openrc file:
|
||||
|
||||
terminal of user “owner”
|
||||
|
||||
```
|
||||
$ source main-openrc.sh
|
||||
Please enter your OpenStack Password for project main as user owner: <here enter the password for owner>
|
||||
|
||||
(owner) $ swift list
|
||||
c-main-a
|
||||
c-main-b
|
||||
c-main-d
|
||||
|
||||
```
|
||||
|
||||
User\_1 sources the RC file[](#user-1-sources-the-rc-file "Permalink to this headline")
|
||||
----------------------------------------------------------------------------------------
|
||||
|
||||
terminal of user “user\_1”:
|
||||
|
||||
```
|
||||
$ source project_1-openrc.sh
|
||||
Please enter your OpenStack Password for project project_1 as user user_1:
|
||||
<here enter the password for user_1>
|
||||
|
||||
(user_1) $ swift list
|
||||
c-project_1-a
|
||||
c-project_1-b
|
||||
|
||||
```
|
||||
|
||||
User\_2 sources the RC file[](#user-2-sources-the-rc-file "Permalink to this headline")
|
||||
----------------------------------------------------------------------------------------
|
||||
|
||||
terminal of user “user\_2”:
|
||||
|
||||
```
|
||||
$ source project_2-openrc.sh
|
||||
Please enter your OpenStack Password for project project_2 as user user_2: <here enter the password for user_2>
|
||||
|
||||
(user_2) $ swift list
|
||||
c-project_2-a
|
||||
c-project_2-b
|
||||
|
||||
```
|
||||
|
||||
Uploading of test files[](#uploading-of-test-files "Permalink to this headline")
|
||||
---------------------------------------------------------------------------------
|
||||
|
||||
The user “owner” prepares and uploads test files:
|
||||
|
||||
```
|
||||
(owner) $ touch test-main-a1.txt
|
||||
(owner) $ touch test-main-a2.txt
|
||||
(owner) $ swift upload c-main-a test-main-a1.txt
|
||||
test-main-a1.txt
|
||||
(owner) $ swift upload c-main-a test-main-a2.txt
|
||||
test-main-a2.txt
|
||||
|
||||
```
|
||||
|
||||

|
||||
|
||||
```
|
||||
(owner) $ touch test-main-b.txt
|
||||
(owner) $ touch test-main-d.txt
|
||||
(owner) $ swift upload c-main-b test-main-b.txt
|
||||
test-main-b.txt
|
||||
|
||||
```
|
||||
|
||||

|
||||
|
||||
```
|
||||
(owner) $ swift upload c-main-d test-main-d.txt
|
||||
test-main-d.txt
|
||||
|
||||
```
|
||||
|
||||

|
||||
|
||||
Check the id of user\_1:
|
||||
|
||||
```
|
||||
(user_1) $ openstack user show --format json "${OS_USERNAME}" | jq -r .id
|
||||
3de5f40b4e6d433792ac387896729ec8
|
||||
|
||||
```
|
||||
|
||||
Check the id of user\_2:
|
||||
|
||||
```
|
||||
(user_2) $ openstack user show --format json "${OS_USERNAME}" | jq -r .id
|
||||
fb4ec0de674d4c5ba608ee75cc6da918
|
||||
|
||||
```
|
||||
|
||||
You can check the status of the container “c-main-a”.
|
||||
|
||||
“Read ACL” and “Write ACL” are not set yet
|
||||
|
||||
```
|
||||
(owner) $ swift stat c-main-a
|
||||
Account: v1
|
||||
Container: c-main-a
|
||||
Objects: 2
|
||||
Bytes: 29
|
||||
Read ACL: *:3de5f40b4e6d433792ac387896729ec8
|
||||
Write ACL: *:3de5f40b4e6d433792ac387896729ec8
|
||||
Sync To:
|
||||
Sync Key:
|
||||
X-Timestamp: 1655199342.39064
|
||||
X-Container-Bytes-Used-Actual: 8192
|
||||
X-Storage-Policy: default-placement
|
||||
X-Storage-Class: STANDARD
|
||||
Last-Modified: Tue, 14 Jun 2022 13:41:32 GMT
|
||||
X-Trans-Id: tx000000000000003964e44-0062b17ebb-17404e6b-default
|
||||
X-Openstack-Request-Id: tx000000000000003964e44-0062b17ebb-17404e6b-default
|
||||
Accept-Ranges: bytes
|
||||
Content-Type: text/plain; charset=utf-8
|
||||
|
||||
```
|
||||
|
||||
Granting access[](#granting-access "Permalink to this headline")
|
||||
-----------------------------------------------------------------
|
||||
|
||||
Grant access to container “c-main-a” for user\_1:
|
||||
|
||||
```
|
||||
(owner) $ swift post --read-acl "*:3de5f40b4e6d433792ac387896729ec8 " c-main-a
|
||||
|
||||
```
|
||||
|
||||
Get the credentials to access Object Store in “main”:
|
||||
|
||||
```
|
||||
(owner) $ swift auth | awk -F = '/OS_STORAGE_URL/ {print $2}'
|
||||
https://s3.waw3-1.cloudferro.com/swift/v1
|
||||
|
||||
```
|
||||
|
||||
Pass the link:
|
||||
|
||||
```
|
||||
https://s3.waw3-1.cloudferro.com/swift/v1
|
||||
|
||||
```
|
||||
|
||||
to “user\_1”
|
||||
|
||||
“user\_1” should create an environmental variable “SURL”
|
||||
|
||||
```
|
||||
(user_1) $ SURL=https://s3.waw3-1.cloudferro.com/swift/v1
|
||||
|
||||
```
|
||||
|
||||
Now the “user\_1” has access to the “c-main-a” container in the “main” project:
|
||||
|
||||
```
|
||||
(user_1) $ swift --os-storage-url="${SURL}" list c-main-a
|
||||
test-main-a1.txt
|
||||
test-main-a2.txt
|
||||
|
||||
```
|
||||
|
||||
But the user “user\_1” has no access to other containers in the “main” project:
|
||||
|
||||
```
|
||||
(user_1) $ swift --os-storage-url="${SURL}" list c-main-b
|
||||
Container GET failed: https://s3.waw3-1.cloudferro.com/swift/v1/c-main-b?format=json 403 Forbidden [first 60
|
||||
chars of response] b'{"Code":"AccessDenied","BucketName":"c-main-b","RequestId":"'
|
||||
Failed Transaction ID: tx00000000000000397edda-0062b186ef-17379d9b-default
|
||||
|
||||
```
|
||||
|
||||
Similar procedure can be used to grant “write” permission to “user\_1”:
|
||||
|
||||
```
|
||||
(owner) $ swift post --write-acl "*:3de5f40b4e6d433792ac387896729ec8 " c-main-a
|
||||
|
||||
```
|
||||
|
||||
What To Do Next[](#what-to-do-next "Permalink to this headline")
|
||||
-----------------------------------------------------------------
|
||||
|
||||
These articles can also be of interest:
|
||||
|
||||
[How to use Object Storage on CloudFerro Cloud](../s3/How-to-use-Object-Storage-on-CloudFerro-Cloud.html).
|
||||
|
||||
[Bucket sharing using s3 bucket policy on CloudFerro Cloud](../s3/Bucket-sharing-using-s3-bucket-policy-on-CloudFerro-Cloud.html)
|
||||
@ -0,0 +1,15 @@
|
||||
How to start a VM from instance snapshot using OpenStack CLI on CloudFerro Cloud[](#how-to-start-a-vm-from-instance-snapshot-using-openstack-cli-on-brand-name "Permalink to this headline")
|
||||
=============================================================================================================================================================================================
|
||||
|
||||
In this article, you will learn how to create a virtual machine from an instance snapshot using OpenStack CLI client.
|
||||
|
||||
Prerequisites[](#prerequisites "Permalink to this headline")
|
||||
-------------------------------------------------------------
|
||||
|
||||
No. 1 **Account**
|
||||
|
||||
You need a CloudFerro Cloud hosting account with access to the Horizon interface: <https://horizon.cloudferro.com>.
|
||||
|
||||
No. 2 **OpenStack CLI client**
|
||||
|
||||
You need to have OpenStack CLI client installed. One of the following articles should help you:
|
||||
@ -0,0 +1,28 @@
|
||||
How to transfer volumes between domains and projects using OpenStack CLI client on CloudFerro Cloud[](#how-to-transfer-volumes-between-domains-and-projects-using-openstack-cli-client-on-brand-name "Permalink to this headline")
|
||||
===================================================================================================================================================================================================================================
|
||||
|
||||
Volumes in OpenStack can be used to store data. They are visible to virtual machines like drives.
|
||||
|
||||
Such a volume is usually available to just the project in which it was created. Transferring data stored on it between projects might take a long time, especially if such a volume contains lots of data, like, say, hundreds or thousands of gigabytes (or even more).
|
||||
|
||||
This article covers changing the assignment of a volume to a project. This allows you to move a volume directly from one project (which we will call *source* project) to another (which we will call *destination* project) using the OpenStack CLI in a way that does **not** require you to physically transfer the data.
|
||||
|
||||
The *source* project and *destination* project must both be on the same cloud (for example WAW3-2). They can (but don’t have to) belong to different users from different domains and organizations.
|
||||
|
||||
What We Are Going To Cover[](#what-we-are-going-to-cover "Permalink to this headline")
|
||||
---------------------------------------------------------------------------------------
|
||||
|
||||
> * Initializing transfer of volume
|
||||
> * Accepting transfer of volume
|
||||
> * Cancelling transfer of volume
|
||||
|
||||
Prerequisites[](#prerequisites "Permalink to this headline")
|
||||
-------------------------------------------------------------
|
||||
|
||||
No. 1 **Account**
|
||||
|
||||
You need a CloudFerro Cloud hosting account with access to the Horizon interface: <https://horizon.cloudferro.com>
|
||||
|
||||
No. 2 **OpenStack CLI Client**
|
||||
|
||||
To use the OpenStack CLI client, you need to have it installed. See one of these articles to learn how to do it:
|
||||
@ -0,0 +1,142 @@
|
||||
Resizing a virtual machine using OpenStack CLI on CloudFerro Cloud[](#resizing-a-virtual-machine-using-openstack-cli-on-brand-name "Permalink to this headline")
|
||||
=================================================================================================================================================================
|
||||
|
||||
Introduction[](#introduction "Permalink to this headline")
|
||||
-----------------------------------------------------------
|
||||
|
||||
When creating a new virtual machine under OpenStack, one of the options you choose is the *flavor*. A flavor is a predefined combination of CPU, memory and disk size and there usually is a number of such flavors for you to choose from.
|
||||
|
||||
After the instance is spawned, it is possible to change one flavor for another, and that process is called *resizing*. You might want to resize an already existing VM in order to:
|
||||
|
||||
> * increase (or decrease) the number of CPUs used,
|
||||
> * use more RAM to prevent crashes or enable swapping,
|
||||
> * add larger storage to avoid running out of disk space,
|
||||
> * seamlessly transition from testing to production environment,
|
||||
> * change application workload byt scaling the VM up or down.
|
||||
|
||||
In this article, we are going to resize VMs using CLI commands in OpenStack.
|
||||
|
||||
Prerequisites[](#prerequisites "Permalink to this headline")
|
||||
-------------------------------------------------------------
|
||||
|
||||
No. 1 **Account**
|
||||
|
||||
You need a CloudFerro Cloud hosting account with access to the Horizon interface: <https://portal.cloudferro.com/>.
|
||||
|
||||
If you are a normal user of CloudFerro Cloud hosting, you will have all prerogatives needed to resize the VM. Make sure that the VM you are about to resize belongs to a project you have access to.
|
||||
|
||||
[How to create a VM using the OpenStack CLI client on CloudFerro Cloud cloud](../cloud/How-to-create-a-VM-using-the-OpenStack-CLI-client-on-CloudFerro-Cloud-cloud.html)
|
||||
|
||||
No. 2 **Awareness of existing quotas and flavors limits**
|
||||
|
||||
For general introduction to quotas and flavors, see [Dashboard Overview – Project Quotas And Flavors Limits on CloudFerro Cloud](../cloud/Dashboard-Overview-Project-Quotas-And-Flavors-Limits-on-CloudFerro-Cloud.html).
|
||||
|
||||
Also:
|
||||
|
||||
> * The VM you want to resize is in an active or shut down state.
|
||||
> * A flavor with the desired resource configuration exists.
|
||||
> * Adequate resources are available in your OpenStack environment to accommodate the resize.
|
||||
|
||||
Creating a new VM[](#creating-a-new-vm "Permalink to this headline")
|
||||
---------------------------------------------------------------------
|
||||
|
||||
To illustrate the commands in this article, let us create a new VM in order to start with a clean slate. (It goes without saying that you can practice with any of the already existing VMs in your account.)
|
||||
|
||||
To see all flavors:
|
||||
|
||||
```
|
||||
openstack flavor list
|
||||
|
||||
```
|
||||
|
||||

|
||||
|
||||
This is the command to create a new VM called **ResizingCLI**:
|
||||
|
||||
```
|
||||
openstack server create \
|
||||
--image "Ubuntu 22.04 LTS" \
|
||||
--flavor eo2a.large \
|
||||
--key-name sshkey \
|
||||
--network cloud_00341_3 \
|
||||
--security-group default \
|
||||
--security-group allow_ping_ssh_icmp_rdp \
|
||||
ResizingCLI
|
||||
|
||||
```
|
||||
|
||||
This is the result:
|
||||
|
||||

|
||||
|
||||
The **id** for **ResizingCLI** is **82bba971-8ff1-4f85-93d6-9d56bb7b185d** and we can use it in various commands to denote this particular VM.
|
||||
|
||||
To see all currently available VMs, use command
|
||||
|
||||
```
|
||||
openstack server list
|
||||
|
||||
```
|
||||
|
||||
Steps to Resize the VM[](#steps-to-resize-the-vm "Permalink to this headline")
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
To resize a VM with CLI, there is a general command
|
||||
|
||||
```
|
||||
openstack server resize --flavor <new_flavor> <vm_name_or_id>
|
||||
|
||||
```
|
||||
|
||||
We need flavor ID or name as well as VM’s name or id.
|
||||
|
||||
In this example we want to scale up the existing VM **ResizingCLI**, using **eo2.xlarge** flavor. The command will be:
|
||||
|
||||
```
|
||||
openstack server resize --flavor eo2.xlarge ResizingCLI
|
||||
|
||||
```
|
||||
|
||||
To verify the resize, check the status of the VM:
|
||||
|
||||
```
|
||||
openstack server show ResizingCLI
|
||||
|
||||
```
|
||||
|
||||

|
||||
|
||||
When the VM has **VERIFY\_RESIZE** status, we are able to confirm the resize. The command is:
|
||||
|
||||
```
|
||||
openstack server resize confirm ResizingCLI
|
||||
|
||||
```
|
||||
|
||||
Execute once again:
|
||||
|
||||
```
|
||||
openstack server show ResizingCLI
|
||||
|
||||
```
|
||||
|
||||
to see the real state of the VM after confirmation. We will now see that the **status** is **ACTIVE**.
|
||||
|
||||
Reverting a resize[](#reverting-a-resize "Permalink to this headline")
|
||||
-----------------------------------------------------------------------
|
||||
|
||||
Reverting a resize switches the VM back to its original flavor and cleans up temporary resources allocated during the resize operation.
|
||||
|
||||
It is only possible to revert a resize if the status is **VERIFY\_RESIZE**. The command would be:
|
||||
|
||||
```
|
||||
openstack server resize revert ResizingCLI
|
||||
|
||||
```
|
||||
|
||||
If status is not **VERIFY\_RESIZE**, we will get message stating that it is not possible to revert resize while it is in an active state (HTTP 409). In that case, perform the “regular” resizing with **openstack server resize**.
|
||||
|
||||
What To Do Next[](#what-to-do-next "Permalink to this headline")
|
||||
-----------------------------------------------------------------
|
||||
|
||||
You can also resize the virtual machine using only OpenStack CLI. More details here: /openstackcli/Resizing-a-virtual-machine-using-OpenStack-Horizon-on-CloudFerro-Cloud
|
||||
@ -0,0 +1,54 @@
|
||||
Use backup command to create rotating backups of virtual machines on CloudFerro Cloud cloud[](#use-backup-command-to-create-rotating-backups-of-virtual-machines-on-brand-name-cloud "Permalink to this headline")
|
||||
===================================================================================================================================================================================================================
|
||||
|
||||
**Rotating backups** in OpenStack refer to a backup strategy where older backups are automatically deleted after a predefined number of backups are created. This ensures that storage does not grow indefinitely while still maintaining a set number of recent backups for disaster recovery.
|
||||
|
||||
The rotating backup algorithm[](#the-rotating-backup-algorithm "Permalink to this headline")
|
||||
---------------------------------------------------------------------------------------------
|
||||
|
||||
Creating rotating backups of virtual machines is a process comprising of the following steps:
|
||||
|
||||
Define the period of backups
|
||||
: Usually, daily, weekly, monthly or in any other time period.
|
||||
|
||||
Define rotation limit
|
||||
: How many backups to retain (we will refer to this number as **maxN** throughout this article).
|
||||
|
||||
Delete older backups
|
||||
: Once the limit is reached, start deleting the existing backups, usually the oldest one.
|
||||
|
||||
backup create vs. image create[](#backup-create-vs-image-create "Permalink to this headline")
|
||||
----------------------------------------------------------------------------------------------
|
||||
|
||||
There are two ways of creating backups under OpenStack, using one of these two commands:
|
||||
|
||||
**openstack server backup create** and **openstack server image create**
|
||||
|
||||
Here is how they compare:
|
||||
|
||||
Table 3 Comparison of Backup and Image Creation Commands[](#id1 "Permalink to this table")
|
||||
|
||||
| Feature | `openstack server backup create` | `openstack server image create` |
|
||||
| --- | --- | --- |
|
||||
| Association with VM | Associated using **backup** image property | Associated using backup name |
|
||||
| Rotation support | Rotation with `--backup-type` and incremental backups | No built-in rotation support |
|
||||
| Classification in Horizon | Marked as **image** | Marked as **snapshot** |
|
||||
| Horizon **Select Boot Source** | Choose **Instance Snapshot** | Choose **Image** |
|
||||
| Purpose | Primarily used for backups, can be rotated and managed | Creates a single VM snapshot without rotation |
|
||||
| Incremental backup support | Yes, supports incremental backups | No, always creates a full snapshot |
|
||||
| Multiple rotating schedules | No, only one | Yes (daily, weekly, monthly etc.) |
|
||||
| Best usage scenario | Automated backup strategies with rotation | Capturing the current state of a VM for cloning or rollback |
|
||||
| Can be scripted? | Yes | Yes |
|
||||
|
||||
In this article we are going to use a **openstack server backup create** command under OpenStack to create rotating backups of virtual machines.
|
||||
|
||||
Prerequisites[](#prerequisites "Permalink to this headline")
|
||||
-------------------------------------------------------------
|
||||
|
||||
No. 1 **Account**
|
||||
|
||||
You need a CloudFerro Cloud hosting account with access to the Horizon interface: <https://horizon.cloudferro.com>
|
||||
|
||||
No. 2 **VM which will be backed up**
|
||||
|
||||
You need a virtual machine which will be backed up. If you don’t have one, you can create it by following one of these articles:
|
||||
@ -0,0 +1,40 @@
|
||||
Use script to create daily weekly and monthly rotating backups of virtual machines on CloudFerro Cloud[](#use-script-to-create-daily-weekly-and-monthly-rotating-backups-of-virtual-machines-on-brand-name "Permalink to this headline")
|
||||
=========================================================================================================================================================================================================================================
|
||||
|
||||
**Rotating backups** in OpenStack refer to a backup strategy where older backups are automatically deleted after a predefined number of backups are created. This ensures that storage does not grow indefinitely while still maintaining a set number of recent backups for disaster recovery.
|
||||
|
||||
backup create vs. image create[](#backup-create-vs-image-create "Permalink to this headline")
|
||||
----------------------------------------------------------------------------------------------
|
||||
|
||||
There are two ways of creating backups under OpenStack, using one of these two commands:
|
||||
|
||||
**openstack server backup create** and **openstack server image create**
|
||||
|
||||
Here is how they compare:
|
||||
|
||||
Table 4 Comparison of Backup and Image Creation Commands[](#id1 "Permalink to this table")
|
||||
|
||||
| Feature | `openstack server backup create` | `openstack server image create` |
|
||||
| --- | --- | --- |
|
||||
| Association with VM | Associated using **backup** image property | Associated using backup name |
|
||||
| Rotation support | Rotation with `--backup-type` and incremental backups | No built-in rotation support |
|
||||
| Classification in Horizon | Marked as **image** | Marked as **snapshot** |
|
||||
| Horizon **Select Boot Source** | Choose **Instance Snapshot** | Choose **Image** |
|
||||
| Purpose | Primarily used for backups, can be rotated and managed | Creates a single VM snapshot without rotation |
|
||||
| Multiple rotating schedules | No, only one | Yes (daily, weekly, monthly etc.) |
|
||||
| Incremental backup support | Yes, supports incremental backups | No, always creates a full snapshot |
|
||||
| Best usage scenario | Automated backup strategies with rotation | Capturing the current state of a VM for cloning or rollback |
|
||||
| Can be scripted? | Yes | Yes |
|
||||
|
||||
In this article, you will learn how to create multiple series of rotating backups with a script which uses multiple **OpenStackClient** commands to achieve this goal.
|
||||
|
||||
Prerequisites[](#prerequisites "Permalink to this headline")
|
||||
-------------------------------------------------------------
|
||||
|
||||
No. 1 **Account**
|
||||
|
||||
You need a CloudFerro Cloud hosting account with access to the Horizon interface: <https://horizon.cloudferro.com>
|
||||
|
||||
No. 2 **VM which will be backed up**
|
||||
|
||||
You need a virtual machine which will be backed up. If you don’t have one, you can create it by following one of these articles:
|
||||
2
docs/openstackcli/openstackcli.html.md
Normal file
2
docs/openstackcli/openstackcli.html.md
Normal file
@ -0,0 +1,2 @@
|
||||
OPENSTACK CLI[](#openstack-cli "Permalink to this headline")
|
||||
=============================================================
|
||||
Reference in New Issue
Block a user