Skip to content

Windows

Since the availability of tools such as Docker for Windows or Podman for Windows users of this platform are encouraged to use the cci-openstack-client container image to access the CERN OpenStack cloud.

This method deprecates the old one based on the CMF package "Python 2.7.5", a component now out of support.

Once you have follow 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 could be used.

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:

PS > 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 Windows:

PS> $Password = Read-Host -assecurestring "Please enter your OpenStack password"
PS> $env:OS_PASSWORD = [Runtime.InteropServices.Marshal]::PtrToStringAuto([Runtime.InteropServices.Marshal]::SecureStringToBSTR($Password))

PS> 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:

PS C:\Users\username> $ProgressPreference = 'SilentlyContinue'
PS C:\Users\username> wget -Uri http://download.cirros-cloud.net/0.6.2/cirros-0.6.2-x86_64-disk.img  -OutFile .\Downloads\cirros.img

PS C:\Users\username> 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  |
(...)