brand changes have been done

This commit is contained in:
govardhan
2025-08-16 08:07:54 +05:30
parent 1c47d19842
commit 365216ccd8
1557 changed files with 2289 additions and 17403 deletions

View File

@ -1,6 +0,0 @@
# 3Engines Development
## Available Documentation
* [Authenticating with 3EnginesSDK using Keycloak Credentials on 3Engines Cloud](Authenticating-to-3EnginesSDK-using-Keycloak-Credentials-on-3Engines-Cloud.html.md)
* [Generating and authorizing Terraform using Keycloak user on 3Engines Cloud](Generating-and-authorizing-Terraform-using-Keycloak-user-on-3Engines-Cloud.html.md)

View File

@ -1,11 +1,11 @@
Authenticating with 3EnginesSDK using Keycloak Credentials on 3Engines Cloud[🔗](#authenticating-with-3Enginessdk-using-keycloak-credentials-on-brand-name "Permalink to this headline")
Authenticating with connectVMSDK using Keycloak Credentials on connectVM Cloud[🔗](#authenticating-with-connectVMsdk-using-keycloak-credentials-on-brand-name "Permalink to this headline")
===========================================================================================================================================================================================
If you are using 3EnginesSDK to write your own script for 3Engines, the code in this tutorial will **enable the user to automatically log into your app**. When the user normally tries to log into the 3Engines Cloud account using <https://portal.3Engines.com/>, they have to log in manually. A screen like this appears:
If you are using connectVMSDK to write your own script for connectVM, the code in this tutorial will **enable the user to automatically log into your app**. When the user normally tries to log into the connectVM Cloud account using <https://portal.connectVM.com/>, they have to log in manually. A screen like this appears:
[![register_3Enginescloud1.png](../_images/register_3Enginescloud1.png)](../_images/register_3Enginescloud1.png)
[![register_connectVMcloud1.png](../_images/register_connectVMcloud1.png)](../_images/register_connectVMcloud1.png)
If they already have an account, they will be logged in after clicking on Login button. The code in this article will avoid exposing the user to such a procedure and if they had ever been authenticated to 3Engines, **the user will be able to log in with your code without even seeing the login screen**.
If they already have an account, they will be logged in after clicking on Login button. The code in this article will avoid exposing the user to such a procedure and if they had ever been authenticated to connectVM, **the user will be able to log in with your code without even seeing the login screen**.
What Are We Going To Do[🔗](#what-are-we-going-to-do "Permalink to this headline")
---------------------------------------------------------------------------------
@ -20,11 +20,11 @@ Prerequisites[🔗](#prerequisites "Permalink to this headline")
**No. 1 Install Python and its environment**
The following article will help you install Python and **pip**, as well as **Venv**: [How to install Python virtualenv or virtualenvwrapper on 3Engines Cloud](../cloud/How-to-install-Python-virtualenv-or-virtualenvwrapper-on-3Engines-Cloud.html.md).
The following article will help you install Python and **pip**, as well as **Venv**: [How to install Python virtualenv or virtualenvwrapper on connectVM Cloud](../cloud/How-to-install-Python-virtualenv-or-virtualenvwrapper-on-connectVM-Cloud.html.md).
**No. 2 RC File**
RC file is available from the 3Engines Horizon module and serves as a source of authentication for the user. For technical details how to get it and activate, see [How To Install 3Engines and Magnum Clients for Command Line Interface to 3Engines Cloud Horizon](../kubernetes/How-To-Install-3Engines-and-Magnum-Clients-for-Command-Line-Interface-to-3Engines-Cloud-Horizon.html.md).
RC file is available from the connectVM Horizon module and serves as a source of authentication for the user. For technical details how to get it and activate, see [How To Install connectVM and Magnum Clients for Command Line Interface to connectVM Cloud Horizon](../kubernetes/How-To-Install-connectVM-and-Magnum-Clients-for-Command-Line-Interface-to-connectVM-Cloud-Horizon.html.md).
Step 1 Source Your RC File[🔗](#step-1-source-your-rc-file "Permalink to this headline")
---------------------------------------------------------------------------------------
@ -34,7 +34,7 @@ Using **Prerequisite No. 2**, download the corresponding RC file. That file can
Here are the system variables (their names all start with **OS\_**) that the **source** command will set up as well:
```
export OS_AUTH_URL=https://keystone.3Engines.com:5000/v3
export OS_AUTH_URL=https://keystone.connectVM.com:5000/v3
export OS_INTERFACE=public
export OS_IDENTITY_API_VERSION=3
export OS_USERNAME="Your E-mail Adress"
@ -45,9 +45,9 @@ export OS_PROJECT_DOMAIN_ID="Your Domain ID"
export OS_AUTH_TYPE=v3oidcpassword
export OS_PROTOCOL=openid
export OS_DISCOVERY_ENDPOINT=https://identity.3Engines.com/auth/realms/Creodias-new/.well-known/openid-configuration
export OS_DISCOVERY_ENDPOINT=https://identity.connectVM.com/auth/realms/Creodias-new/.well-known/openid-configuration
export OS_IDENTITY_PROVIDER=ident_creodias-new_provider
export OS_CLIENT_ID=3Engines
export OS_CLIENT_ID=connectVM
export OS_CLIENT_SECRET=50xx4972-546x-46x9-8x72-x91x401x8x30
```
@ -58,34 +58,34 @@ Step 2 Create Python Code that Will Perform Keycloak Authentication Within Your
In this step you will copy the values from RC file to your Python code. For instance, variable
```
OS_DISCOVERY_ENDPOINT=https://identity.3Engines.com/auth/realms/Creodias-new/.well-known/openid-configuration
OS_DISCOVERY_ENDPOINT=https://identity.connectVM.com/auth/realms/Creodias-new/.well-known/openid-configuration
```
from RC file will become the value of the eponymous variable in your code:
```
auth['discovery_endpoint'] = "https://identity.3Engines.com/auth/realms/Creodias-new/.well-known/openid-configuration"
auth['discovery_endpoint'] = "https://identity.connectVM.com/auth/realms/Creodias-new/.well-known/openid-configuration"
```
Here is what your code should look like in the end:
```
from 3Engines import connection
from connectVM import connection
import sys
import os
from 3Engines import enable_logging
from connectVM import enable_logging
auth = {}
auth['auth_url'] = "https://keystone.3Engines.com:5000/v3"
auth['auth_url'] = "https://keystone.connectVM.com:5000/v3"
auth['username'] = "Your E-mail Adress"
auth['password'] = os.getenv('OS_PASSWORD')
auth['project_domain_id'] = "Your Domain ID"
auth['project_name'] = "Your Project Name"
auth['project_id'] = "Your Project ID"
auth['discovery_endpoint'] = "https://identity.3Engines.com/auth/realms/Creodias-new/.well-known/openid-configuration"
auth['client_id'] = "3Engines"
auth['discovery_endpoint'] = "https://identity.connectVM.com/auth/realms/Creodias-new/.well-known/openid-configuration"
auth['client_id'] = "connectVM"
auth['identity_provider'] = 'ident_creodias-new_provider'
auth['client_secret'] = os.getenv('OS_CLIENT_SECRET')
auth['protocol'] = 'openid'

View File

@ -1,13 +1,13 @@
Generating and authorizing Terraform using Keycloak user on 3Engines Cloud[🔗](#generating-and-authorizing-terraform-using-keycloak-user-on-brand-name "Permalink to this headline")
Generating and authorizing Terraform using Keycloak user on connectVM Cloud[🔗](#generating-and-authorizing-terraform-using-keycloak-user-on-brand-name "Permalink to this headline")
=====================================================================================================================================================================================
Clicking in Horizon and entering CLI commands are two main ways of using an 3Engines system. They are well suited to interactively executing one command at a time but do not scale up easily. A tool such as [Terraform, by HashiCorp corporation,](https://www.terraform.io/) provides an alternative to manual ways of introducing cascading changes. Here is how you could, say, create several instances at once:
Clicking in Horizon and entering CLI commands are two main ways of using an connectVM system. They are well suited to interactively executing one command at a time but do not scale up easily. A tool such as [Terraform, by HashiCorp corporation,](https://www.terraform.io/) provides an alternative to manual ways of introducing cascading changes. Here is how you could, say, create several instances at once:
> * Define parameters for the creation of one instance,
> * save them in a Terraform configuration file and
> * let Terraform automatically repeat it the prescribed number of times.
The plan is to install Terraform, get 3Engines token, enter it into the configuration file and execute. You will then be able to effectively use Terraform within the 3Engines Cloud cloud. For instance, with Terraform you can
The plan is to install Terraform, get connectVM token, enter it into the configuration file and execute. You will then be able to effectively use Terraform within the connectVM Cloud cloud. For instance, with Terraform you can
> * automate creation of a multitude of virtual machines, each with their own floating IPs, DNS and network functions or
> * automate creation of Kubernetes clusters
@ -19,7 +19,7 @@ What We Are Going To Do[🔗](#what-we-are-going-to-do "Permalink to this headli
> * Install Terraform as a root user
> * Reconnect to the cloud
> * Download 3Engines token
> * Download connectVM token
> * Set up the configuration file and initialize Terraform
> * Create Terraform code
> * Explain the meaning of the variables used
@ -30,25 +30,25 @@ Prerequisites[🔗](#prerequisites "Permalink to this headline")
No. 1 **Account**
You need a 3Engines Cloud hosting account with access to the Horizon interface: <https://3engine.rootxwire.com/>. In particular, you will need the password for the account so have it ready in advance.
You need a connectVM Cloud hosting account with access to the Horizon interface: <https://console.connectvm.com/>. In particular, you will need the password for the account so have it ready in advance.
No. 2 **Installed version of Linux**
You can use your current Linux installation, however, in this article we shall start with a clean slate. Create a new VM with Ubuntu as defined in this article:
[How to create a Linux VM and access it from Linux command line on 3Engines Cloud](../cloud/How-to-create-a-Linux-VM-and-access-it-from-Linux-command-line-on-3Engines-Cloud.html.md).
[How to create a Linux VM and access it from Linux command line on connectVM Cloud](../cloud/How-to-create-a-Linux-VM-and-access-it-from-Linux-command-line-on-connectVM-Cloud.html.md).
No. 3 **Installed 3EnginesClient for Linux**
No. 3 **Installed connectVMClient for Linux**
To get token from the cloud, you will first need to enable access from the Ubuntu VM you just created:
[How to install 3EnginesClient for Linux on 3Engines Cloud](../3Enginescli/How-to-install-3EnginesClient-for-Linux-on-3Engines-Cloud.html.md)
[How to install connectVMClient for Linux on connectVM Cloud](../connectVMcli/How-to-install-connectVMClient-for-Linux-on-connectVM-Cloud.html.md)
It will show you how to install Python, create and activate a virtual environment, and then connect to the cloud by downloading and activating the proper RC file from the 3Engines Cloud cloud.
It will show you how to install Python, create and activate a virtual environment, and then connect to the cloud by downloading and activating the proper RC file from the connectVM Cloud cloud.
No. 4 **Connect to the cloud via an RC file**
Another article, [How to activate 3Engines CLI access to 3Engines Cloud cloud using one- or two-factor authentication](../accountmanagement/How-to-activate-3Engines-CLI-access-to-3Engines-Cloud-cloud-using-one-or-two-factor-authentication.html.md), deals with connecting to the cloud and is covering either of the one- or two-factor authentication procedures that are enabled on your account. It also covers all the main platforms: Linux, MacOS and Windows.
Another article, [How to activate connectVM CLI access to connectVM Cloud cloud using one- or two-factor authentication](../accountmanagement/How-to-activate-connectVM-CLI-access-to-connectVM-Cloud-cloud-using-one-or-two-factor-authentication.html.md), deals with connecting to the cloud and is covering either of the one- or two-factor authentication procedures that are enabled on your account. It also covers all the main platforms: Linux, MacOS and Windows.
You will use both the Python virtual environment and the downloaded RC file **after** Terraform has been installed.
@ -98,10 +98,10 @@ su eouser # Exit root mode
Step 2 Reconnect to the cloud[🔗](#step-2-reconnect-to-the-cloud "Permalink to this headline")
---------------------------------------------------------------------------------------------
Working through Prerequisites Nos. 2 and 3, you ended up being connected up to the cloud. That connection is now lost because you have switched to **root** user and back again, to the normal **eouser** for the 3Engines Cloud cloud. Refer to **Prerequisite No. 4 Activate the RC file** to reconnect to the cloud again. The following command will act as a test:
Working through Prerequisites Nos. 2 and 3, you ended up being connected up to the cloud. That connection is now lost because you have switched to **root** user and back again, to the normal **eouser** for the connectVM Cloud cloud. Refer to **Prerequisite No. 4 Activate the RC file** to reconnect to the cloud again. The following command will act as a test:
```
3Engines flavor list
connectVM flavor list
```
@ -111,13 +111,13 @@ and should present a start of a list of flavors available in the system:
**You are now ready to receive token from the cloud you are working with.** The “token” is actually a very long string of characters which serves as kind of password for your code.
Step 3 Download 3Engines token[🔗](#step-3-download-3Engines-token "Permalink to this headline")
Step 3 Download connectVM token[🔗](#step-3-download-connectVM-token "Permalink to this headline")
-------------------------------------------------------------------------------------------------
Get token with the following command:
```
3Engines token issue -f shell -c id
connectVM token issue -f shell -c id
```
@ -151,11 +151,11 @@ sudo nano yourconffile.tf # Name it as you want
Paste the following into the file:
```
# Configure the 3Engines Provider
# Configure the connectVM Provider
terraform {
required_providers {
3Engines = {
source = "terraform-provider-3Engines/3Engines"
connectVM = {
source = "terraform-provider-connectVM/connectVM"
}
}
}
@ -164,7 +164,7 @@ Paste the following into the file:
Save the file (for Nano, use **Ctrl-X** and **Y**).
These commands inform Terraform it will work with 3Engines.
These commands inform Terraform it will work with connectVM.
Use the following command to initialize Terraform:
@ -186,7 +186,7 @@ The screen after initialization would look like this:
![terraform_init.png](../_images/terraform_init.png)
Terraform has been initialized and is working properly with your 3Engines cloud. Now add code to perform some useful tasks.
Terraform has been initialized and is working properly with your connectVM cloud. Now add code to perform some useful tasks.
Note
@ -198,24 +198,24 @@ Step 5 Create Terraform code[🔗](#step-5-create-terraform-code "Permalink to t
Append code to the contents of the **yourconffile.tf**. It will generate four virtual machines as specified in the value of variable **count**. The entire file **yourconffile.tf** should now look like this:
```
# Configure the 3Engines Provider
# Configure the connectVM Provider
terraform {
required_providers {
3Engines = {
source = "terraform-provider-3Engines/3Engines"
connectVM = {
source = "terraform-provider-connectVM/connectVM"
}
}
}
provider "3Engines" {
provider "connectVM" {
user_name = "[email protected]"
tenant_name = "cloud_00aaa_1"
auth_url = "https://keystone.3Engines.com:5000/v3"
auth_url = "https://keystone.connectVM.com:5000/v3"
domain_name = "cloud_00aaa_1"
token = "gAAAAABj1VTWP_CFhfKv4zWVH7avFUnHYf5J4TvuKG_Md1EdSpBIBZqTVErqVNWCnO-kYq9D7fi33aRCABadsp23-e-lrDFwyZGkfv-d83UkOTsoIuWogupmwx-3gr4wPcsikBvkAMMBD0-XMIkUONAPst6C35QnztSzZmVSeuXOJ33DaGr6yWbY-tNAOpNsk0C9c13U6ROI"
}
resource "3Engines_compute_instance_v2" "test-terra" {
resource "connectVM_compute_instance_v2" "test-terra" {
count = 4
name = "test-instance-${count.index}"
image_id = "d7ba6aa0-d5d8-41ed-b29b-3f5336d87340"
@ -235,9 +235,9 @@ name = "cloud_00aaa_3"
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 3Engines Cloud cloud are upgraded to the new versions. As a consequence, their **image id** will change. Lets 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.
From time to time, the default images of operating systems in the connectVM Cloud cloud are upgraded to the new versions. As a consequence, their **image id** will change. Lets 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 3Engines, perhaps using Heat, Terraform, Ansible or any other tool for 3Engines 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.
Now, suppose you wanted to automate processes under connectVM, perhaps using Heat, Terraform, Ansible or any other tool for connectVM 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
@ -249,7 +249,7 @@ The meaning of the variables used[🔗](#the-meaning-of-the-variables-used "Perm
The meaning of the variables used is as follows:
**user\_name**
: User name with which you log in into the 3Engines Cloud account. You can use email address here as well.
: User name with which you log in into the connectVM Cloud account. You can use email address here as well.
**tenant\_name**
: Starts with **cloud\_00**. You can see it in the upper left corner of the Horizon window.
@ -258,7 +258,7 @@ The meaning of the variables used is as follows:
: If you have only one project in the domain, this will be identical to the **tenant\_name** from above.
**token**
: The **id** value you got from command **3Engines token issue**.
: The **id** value you got from command **connectVM token issue**.
**count**
: How many times to repeat the operation (in this case, four new virtual machines to create)
@ -270,7 +270,7 @@ The meaning of the variables used is as follows:
: The name or **ID** code for an operating systems image you get with command **Compute** -> **Images**. For example, if you choose *Ubuntu 20.04 LTS* image, its **ID** is *d7ba6aa0-d5d8-41ed-b29b-3f5336d87340*.
**flavor\_id**
: Name of the flavor that each VM will have. You get these names from command **3Engines flavor list**.
: Name of the flavor that each VM will have. You get these names from command **connectVM flavor list**.
**security\_groups**
: Here, it is an array of two security groups **default** and **allow\_ping\_ssh\_icmp\_rdp**. These are the basic security groups that should be used as a start for all VMs.
@ -342,4 +342,4 @@ to learn other commands Terraform can offer.
What To Do Next[🔗](#id1 "Permalink to this headline")
-----------------------------------------------------
Article [How to create a set of VMs using 3Engines Heat Orchestration on 3Engines Cloud](../3Enginescli/How-to-create-a-set-of-VMs-using-3Engines-Heat-Orchestration-on-3Engines-Cloud.html.md) uses orchestration capabilities of 3Engines to automate creation of virtual machines. It is a different approach compared to Terraform but both can lead to automation under 3Engines.
Article [How to create a set of VMs using connectVM Heat Orchestration on connectVM Cloud](../connectVMcli/How-to-create-a-set-of-VMs-using-connectVM-Heat-Orchestration-on-connectVM-Cloud.html.md) uses orchestration capabilities of connectVM to automate creation of virtual machines. It is a different approach compared to Terraform but both can lead to automation under connectVM.

View File

@ -0,0 +1,6 @@
# connectVM Development
## Available Documentation
* [Authenticating with connectVMSDK using Keycloak Credentials on connectVM Cloud](Authenticating-to-connectVMSDK-using-Keycloak-Credentials-on-connectVM-Cloud.html.md)
* [Generating and authorizing Terraform using Keycloak user on connectVM Cloud](Generating-and-authorizing-Terraform-using-Keycloak-user-on-connectVM-Cloud.html.md)