Mac OS X
Since the availability of tools such as Docker for Mac or Podman for Mac users of this platform are encouraged to use the cci-openstack-client container image to access the CERN OpenStack cloud.
Once you have followed the installation instructions of any of the tools proposed, you should be able to start using the container images straightaway. The following sections contains a few examples of how the clients can be used in macOS from a Terminal session.
Run commands interactively using kerberos
The image can be used to run commands interactively. In this case, using the default kerberos authentication method is the recommended approach:
username@macos ~ % docker run -it registry.cern.ch/cloud/cci-openstack-client:cern bash
[root@d3b3cba9b18b /]# kinit your-user-name
Password for fernandl@CERN.CH:
[root@d3b3cba9b18b /]# export OS_PROJECT_NAME="Personal your-user-name"
[root@d3b3cba9b18b /]# openstack server list
+--------------------------------------+---------------+--------+------------------------------+
| ID | Name | Status | Networks |
+--------------------------------------+---------------+--------+------------------------------+
| 00000000-0000-0000-0000-000000000000 | instance-name | ACTIVE | CERN_NETWORK=0.0.0.0 |
+--------------------------------------+---------------+--------+------------------------------+
Run commands using password authentication
By default the image is configured to use Kerberos, but it is possible as well to use password based authentication. This approach can be handy while automating tasks from macOS:
username@macos ~ % echo "Enter your OpenStack password: " && read -sr OS_PASSWORD_INPUT && export OS_PASSWORD=$OS_PASSWORD_INPUT
username@macos ~ % docker run --env OS_USERNAME=your-user-name --env OS_PASSWORD --env OS_PROJECT_NAME="Personal your-user-name" --env OS_AUTH_TYPE=v3password -it registry.cern.ch/cloud/cci-openstack-client:cern openstack server list
+--------------------------------------+---------------+--------+------------------------------+
| ID | Name | Status | Networks |
+--------------------------------------+---------------+--------+------------------------------+
| 00000000-0000-0000-0000-000000000000 | instance-name | ACTIVE | CERN_NETWORK=0.0.0.0 |
+--------------------------------------+---------------+--------+------------------------------+
Commands accessing local files
Commands that required access to local files (e.g. create glance images) can be executed using the standard docker options to share files from the host to the container. The following example downloads a cloud image and uploads it to glance:
username@macos ~ % curl -L http://download.cirros-cloud.net/0.6.2/cirros-0.6.2-x86_64-disk.img -o ./Downloads/cirros.img
username@macos ~ % docker run -it -v ./Downloads:/mnt registry.cern.ch/cloud/cci-openstack-client:cern bash
[root@d3b3cba9b18b /]# kinit your-user-name
Password for fernandl@CERN.CH:
[root@d3b3cba9b18b /]# export OS_PROJECT_NAME="Personal your-user-name"
[root@4aa4970972f2 /]# openstack image create cirros-test --file /mnt/cirros.img
+------------------+-----------------------+
| Field | Value |
+------------------+-----------------------+
| container_format | bare |
| created_at | 2024-01-23T12:53:25Z |
(...)