Differenze tra le versioni di "Cloud-Calcolo&Storage"

Da ISTI S2I2S Wiki.
Jump to navigation Jump to search
(Pagina sostituita con 'We have an on premise OpenStack cluster, with distributed storage based on Ceph. The OpenStack@ISTI dashboard is reachable at https://isti-cloud.isti.cnr.it/. All the pr...')
Etichetta: Sostituito
 
Riga 4: Riga 4:
  
 
All the pre-authorized ISTI users have access from default to the LAB-cloud project (where LAB is the ISTI laboratory user belong to).
 
All the pre-authorized ISTI users have access from default to the LAB-cloud project (where LAB is the ISTI laboratory user belong to).
 
== Virtual Machines Management using the dashboard ==
 
 
The OpenStack dashboard is available at ISTI at the following URL: https://isti-cloud.isti.cnr.it/dashboard/project/
 
 
===Launch an instance (which means Create Instance) ===
 
 
# From the Compute menu, select Instances
 
# Press Launch Instance
 
# Fill the following section
 
 
'''Details'''
 
Write the instance name (it's actually a prefix if more than one instance is being lauched), no spaces are allowed
 
Choose the number of instances to launch
 
 
'''Source'''
 
        Select Image as boot source if you don't have the necessity to boot from a existing snapshot
 
        Choose the Volume size
 
        Select Yes for Delete Volume on Instance Delete
 
        Select the chosen operating system image
 
 
'''Flavor'''
 
 
        Select the flavor of the VM. When launching more than one instance, every instance will have the same flavor (and the same OS)
 
 
'''Network'''
 
 
    Select the PROJECT-main Network
 
    The public IP addresses can be assigned later
 
 
'''Network ports'''
 
 
    Not used by us
 
 
'''Security groups'''
 
 
    @ISTI The default one opens
 
 
        ssh from the VPN gateways and using the proxy jump configuration.
 
        http and https from the load balancers only
 
        port 8100 from the proxy jump host (this is the port we use for the tomcat debugging service)
 
        port 9100 from the prometheus server (node exporter)
 
 
 
'''Key Pair'''
 
 
    Select your key pair. You can create or import one if it's not present already
 
 
'''Server groups'''
 
 
    They can optionally be used to equally distribute the VMs on the hypervisor. They must be created in advance, from the Compute -> Server Groups menu
 
 
'''Scheduler hints'''
 
 
    Not used by us
 
 
'''Metadata'''
 
 
    Not used by us
 
 
 
'''==>''' Now press '''Launch Instance''' , you'll be redirected to the instances page
 
 
 
'''Public Ip addresses (Floating IP)'''
 
 
You can now add a public IP address to your instances using the Associate Floating IP item of the menu associated to the VM.
 
 
 
''Important : in the ISTI infrastructure, you can associate a FQDN to the floating IP address.
 
You have to add the hostname and the domain (ending with a .) in the form used to allocate the floating IP addresses.
 
Note that the operation gives back an error, but the operation still completes successfully.
 
If you are unsure about the domain name, you can find it in the DNS -> Zones menu.''
 
 
 
 
 
== Virtual Machines Management using the command line ==
 
=== Configure the command line ===
 
 
<ul>
 
<li>The OpenStack client SDK must be installed (<code>python3-openstackclient</code>).</li>
 
</ul>
 
 
<blockquote>
 
<blockquote>
 
<p>N.B: Python 3.8+ is required.</p>
 
 
'''Install Python 3 in Mac Os'''
 
<pre>brew install python@3.10</pre>
 
 
'''Install Python 3 in Ubuntu'''
 
<pre>
 
apt install python3.10 python3.10-dev python3-pip python3.10-venv
 
pip install pyproject-toml
 
</pre>
 
</blockquote>
 
</blockquote>
 
 
<ul>
 
<li>Create a virtualenv, enable it, and then install the following packages:</li>
 
</ul>
 
 
<blockquote>
 
<blockquote>
 
<pre>
 
python3 -m venv ~/openstack
 
source ~/openstack/bin/activate
 
pip install pip --upgrade
 
pip install python-openstackclient
 
pip install python-barbicanclient
 
pip install python-designateclient
 
pip install python-glanceclient
 
pip install python-heatclient
 
pip install python-magnumclient
 
pip install python-neutronclient
 
pip install python-novaclient
 
pip install python-swiftclient
 
pip install python-octaviaclient
 
</pre></blockquote>
 
</blockquote>
 
 
<ul>
 
<li>To use the client OpenStack enable the virtualenv</li>
 
</ul>
 
 
<blockquote>
 
<blockquote>
 
<pre>
 
source ~/openstack/bin/activate
 
</pre></blockquote>
 
</blockquote>
 
 
<p>Your prompt will change putting before your default prompt the prefix (openstack-NAME_PROJECT)</p>
 
<pre>(openstack-NAME_PROJECT)USERNAME@XXXX:~/$</pre>
 
 
=== Operate the OpenStack regions (connect to OpenStack) ===
 
 
==== Create an application credentials to access the OpenStack projects ====
 
 
<ul>
 
<li><p>From the dashboard follow Identity &gt; Application Credentials &gt; Create Application Credentials<br>
 
<u><em>pay attention to the expiry date and set it to a reasonable value, e.g. 6/12 months</em></u> </p></li>
 
<li><p>Immediately download the clouds.yaml</p></li>
 
<li><p>The file must be saved in home fo the user as ~/.config/openstack/clouds.yaml. If a file exists already, the configuration must be appended and renamed.</p></li>
 
</ul>
 
 
 
=== Some commands ===
 
<pre>
 
openstack server list
 
openstack image list
 
openstack network list
 
openstack volume list
 
openstack floating ip pool list
 
openstack floating ip list
 
openstack security group list
 
openstack server add floating ip INSTANCE_NAME_OR_ID FLOATING_IP_ADDRESS
 
openstack volume list
 
openstack port list
 
openstack server add volume INSTANCE_NAME VOLUME_NAME
 
</pre>
 
 
The documentation of all commands is available at [https://docs.openstack.org/python-openstackclient/wallaby/cli/command-list.html Command list for wallaby]
 
 
 
== VM creation ==
 
 
<p>TO BE DONE</p>
 

Versione attuale delle 14:19, 14 mag 2024

We have an on premise OpenStack cluster, with distributed storage based on Ceph.

The OpenStack@ISTI dashboard is reachable at https://isti-cloud.isti.cnr.it/.

All the pre-authorized ISTI users have access from default to the LAB-cloud project (where LAB is the ISTI laboratory user belong to).