11---
22title : Getting Started with OpenStack
3- version : 2023-03-02
4- author : Ralf Heiringhoff, Eduard Itrich
3+ version : 2023-08-04
4+ author : Ralf Heiringhoff, Eduard Itrich, Mathias Fechner
55---
66
77## Getting Started with OpenStack CLI
88
99## OpenStackClient (CLI)
1010
11- The OpenStackClient is installable via all major Linux Distributions (` apt search openstackclient ` )
12- or directly via [ pypi] ( https://pypi.org/project/python-openstackclient ) . For
13- further Information see the OpenStack Project upstream website
11+ The OpenStackClient is installable via all major Linux Distributions:
12+
13+ for debian and ubuntu with apt:
14+
15+ ``` bash
16+ sudo apt install python3-openstackclient
17+ ```
18+
19+ for ubuntu with snap openstack CLI is installable too:
20+
21+ ``` bash
22+ sudo snap install openstackclients
23+ ```
24+
25+ > [ !NOTE]
26+ > Versions from Linux repository could be in a stable but old state.
27+
28+ Install it directly via [ pypi] ( https://pypi.org/project/python-openstackclient )
29+ from upstream is the recommend way.
30+
31+ Here for example RHEL:
32+
33+ ``` bash
34+ sudo dnf install python3 python3-devel gcc python3-pip
35+ ```
36+
37+ Here for example Debian and Ubuntu:
38+
39+ ``` bash
40+ sudo apt install python3-minimal python3-pip python3-venv python3-dev build-essential
41+ ```
42+
43+ Here as example for SUSE
44+
45+ ``` bash
46+ sudo zypper in python3-pip python3-venv python3-dev
47+ ```
48+
49+ Here for example with Apple's MacOS
50+
51+ ``` bash
52+ brew install python3
53+ ```
54+
55+ > [ !NOTE]
56+ > Python installation for windows systems please use the [ python installation guide] ( https://www.python.org/downloads/windows/ )
57+ > or recommend use the [ Linux Subsystem WSL] ( https://learn.microsoft.com/de-de/windows/wsl/install )
58+
59+ Python Virtualenv
60+
61+ It is also recommended to use virtual environments, here as an example for
62+ Linux and MacOS:
63+
64+ ``` bash
65+ python3 -m venv oscli
66+ source oscli/bin/activate
67+ pip install --upgrade pip
68+ pip install python-openstackclient \
69+ python-cinderclient \
70+ python-designateclient \
71+ python-glanceclient \
72+ python-neutronclient \
73+ python-novaclient \
74+ python-octaviaclient \
75+ python-barbicanclient
76+
77+ ```
78+
79+ For further Information see the OpenStack Project upstream website
1480[ python-openstackclient] ( https://docs.openstack.org/python-openstackclient/latest/index.html ) .
1581
1682This repo holds examples for [ clouds-public.yaml] ( clouds-public.yaml ) + [ clouds.yaml] ( clouds.yaml.sample ) .
1783
18- Alternatively you can download an OpenRC Environment file when you're logged in to Horizon:
84+ Alternatively you can download an OpenRC Environment file when you're logged
85+ in to Horizon:
1986
2087- upper right side :arrow_right : ` <your login name> `
2188- OpenStack RC File
@@ -25,16 +92,35 @@ $ source ./<your file>-openrc.sh
2592Please enter your OpenStack Password for project XXX as user YYY:
2693```
2794
28- when you're using clouds.yaml you can specify multiple endpoints and select the specific endpoint
29- by passing ` --os-cloud= ` to the openstack cmdline or setting ` OS_CLOUD ` .
95+ ``` bash
96+ openstack --help
97+ ```
98+
99+ when you're using clouds.yaml you can specify multiple endpoints and
100+ select the specific endpoint by passing ` --os-cloud= ` to the
101+ openstack cmdline or setting ` OS_CLOUD ` .
102+
103+ ``` bash
104+ openstack --os-cloud MYCLOUD
105+ ```
106+
107+ or
108+
109+ ``` bash
110+ export OS_CLOUD=MYCLOUD
111+ openstack
112+ ```
113+
114+ OpenStack Client in action inside of the OSISM testbed:
115+ ![ Example OpenStackClient in testbed] ( getting_started_openstack_anim.gif )
30116
31117## Object Storage (S3)
32118
33119Create AWS like credentials with ` openstack ec2 credentials create ` .
34- If you use libs3, store the access field in ` S3_ACCESS_KEY_ID ` and the secret field in
35- ` S3_SECRET_ACCESS_KEY ` and set ` S3_HOSTNAME=<Object Storage endpoint> ` .
36- You will see the same buckets (containers) and objects whether you access your object store
37- via the swift or via the s3 protocol.
120+ If you use libs3, store the access field in ` S3_ACCESS_KEY_ID ` and the secret
121+ field in ` S3_SECRET_ACCESS_KEY ` and set ` S3_HOSTNAME=<Object Storage endpoint> ` .
122+ You will see the same buckets (containers) and objects whether you access your
123+ object store via the swift or via the s3 protocol.
38124
39125## References
40126
0 commit comments