仮想化通信

日本仮想化技術株式会社の公式エンジニアブログ

Airshipを試してみた

2018年7月19日の今日は、OpenStackの誕生日だそうです。

Happy Birthday!

f:id:virtualtech:20180730185702p:plain:w180

OpenStackは2010年の今日、米Rackspace HostingとNASAの共同でオープンソースのクラウドソフトウェアを作るプロジェクトであるOpenStackプロジェクトが開始されました。

それから8年が経ちました。 そこで、今回はOpenStackネタを投稿してみたいと思います。

突然のネタ振り

ある日のこと。 「Airshipというものがあるので試してみて?」とのことなので、早速試してみることにしました。 Airshipは現在絶賛開発中のツールで、ざっくり説明するとKubernetesの上でOpenStackを動かせてしまうツールです。雰囲気はTripleOみたいなものです。

今回試したものは公式サイトに掲載されている「airship-in-a-bottle」というもので、一台のサーバーにKubernetesをデプロイしたあと、Kubernetesの上でOpenStackをデプロイするというものです。

ソースコードはこちらで公開されています。

Kubernetesの上でOpenStackを動かすといった試みは各社色々苦労されていると思いますが、Airshipを使えば数ステップのコマンド入力だけでそれを実現してくれます。まるで夢のようなツールですね。

公開されている情報から割と面白そうだったので、先月の今頃にAirshipを試してみたのですが、そのときはデプロイの途中でエラーが発生してしまい、うまく構築することができませんでした。

別件の調査が終わりコミットログを見たところ、最近やたら頻繁に更新されているので、本日もう一度試すことにしました。

AirShipを味見

では早速、試してみましょう。 ドキュメントによると、「VMで動かすには4 vCPU, 16GB RAMと64GBのディスクの空き」が最低限必要とあります。今回は以下のスペックのサーバーを用意しました。このサーバーにMAASを使ってUbuntu 16.04 (Kernel 4.13.0-45-generic)をデプロイしました。

  • HPE ProLiant DL360 G7
    • 16CoreCPU,48GBMEM,300GB SASといった構成のマシン

実行するコマンドは公式サイトに書かれている通り、たった5つです。

% sudo -i
# mkdir -p /root/deploy && cd "$_"
# git clone https://github.com/openstack/airship-in-a-bottle  ※1
# cd /root/deploy/airship-in-a-bottle/manifests/dev_single_node
# ./airship-in-a-bottle.sh

実行すると次のようなセットアップを自動で行ってくれます。1時間くらいかかると思います。

Welcome to Airship in a Bottle

 /--------------------\
|                      \
|        |---|          \----
|        | x |                \
|        |---|                 |
|          |                  /
|     \____|____/       /----
|                      /
 \--------------------/


A prototype example of deploying the Airship suite on a single VM.


This example will run through:
 - Setup
 - Genesis of Airship (Kubernetes)
 - Basic deployment of Openstack (including Nova, Neutron, and Horizon using Openstack Helm)
 - VM creation automation using Heat

※1 ディレクトリーに移動して、git checkout d071cbf864688e5479922f88f36c6bff8c146c47を実行すると今回利用したバージョンのソースでデプロイできます。

※2 以下のコミットで構築できることを確認しています。

  • commit d071cbf864688e5479922f88f36c6bff8c146c47
  • commit 3dd7150fefe19e436ebb8b9a47204da3b5b1bd61 (2018/7/30確認)
  • commit b30c0d6ab4754b4e43708895da637fa9e8d31b83 (2019/1/10確認)

最後にシェルスクリプトを実行しています。これがデプロイスクリプトなのですが、現在処理している内容を冗長に出力して欲しかったため、スクリプトの先頭のシバンに-xをつけてから実行しました。

#!/bin/bash -x
#
# Copyright 2018 AT&T Intellectual Property.  All other rights reserved.
...

あとはエラーが起きずにデプロイ完了するのを待つだけです。全ての出力をここに貼り付けると相当な行数になって見づらさを感じると思いますので、必要なところだけ抜き出すとこのような感じです。

おおよそ1時間程度かかりました。

root@dl360g7n4:~# ./airship-in-a-bottle.sh
...
Performing basic sanity checks by creating heat stacks
 
+ cd /root/deploy/airship-in-a-bottle/manifests/dev_single_node
+ bash test_create_heat_stack.sh
Reading package lists... Done
Building dependency tree       
Reading state information... Done
curl is already the newest version (7.47.0-1ubuntu2.11).
The following package was automatically installed and is no longer required:
  grub-pc-bin
Use 'sudo apt autoremove' to remove it.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Creating KeyPair
Downloading heat-public-net-deployment.yaml
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   895  100   895    0     0   1824      0 --:--:-- --:--:-- --:--:--  1826
Creating public-net Heat Stack
2019-01-10 05:47:23Z [public-net]: CREATE_IN_PROGRESS  Stack CREATE started
2019-01-10 05:47:23Z [public-net.public_net]: CREATE_IN_PROGRESS  state changed
2019-01-10 05:47:24Z [public-net.public_net]: CREATE_COMPLETE  state changed
2019-01-10 05:47:24Z [public-net.private_subnet]: CREATE_IN_PROGRESS  state changed
2019-01-10 05:47:25Z [public-net.private_subnet]: CREATE_COMPLETE  state changed
2019-01-10 05:47:25Z [public-net]: CREATE_COMPLETE  Stack CREATE completed successfully
+---------------------+--------------------------------------+
| Field               | Value                                |
+---------------------+--------------------------------------+
| id                  | 03b83c0f-e621-4e3f-91c6-91b4480ed81c |
| stack_name          | public-net                           |
| description         | No description                       |
| creation_time       | 2019-01-10T05:47:22Z                 |
| updated_time        | None                                 |
| stack_status        | CREATE_COMPLETE                      |
| stack_status_reason | Stack CREATE completed successfully  |
+---------------------+--------------------------------------+
Downloading heat-basic-vm-deployment.yaml
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  2361  100  2361    0     0   6978      0 --:--:-- --:--:-- --:--:--  6964
Creating test-stack-01
2019-01-10 05:47:36Z [test-stack-01]: CREATE_IN_PROGRESS  Stack CREATE started
2019-01-10 05:47:37Z [test-stack-01.port_security_group]: CREATE_IN_PROGRESS  state changed
2019-01-10 05:47:38Z [test-stack-01.port_security_group]: CREATE_COMPLETE  state changed
2019-01-10 05:47:38Z [test-stack-01.router]: CREATE_IN_PROGRESS  state changed
2019-01-10 05:47:39Z [test-stack-01.private_net]: CREATE_IN_PROGRESS  state changed
2019-01-10 05:47:41Z [test-stack-01.flavor]: CREATE_IN_PROGRESS  state changed
2019-01-10 05:47:41Z [test-stack-01.private_net]: CREATE_COMPLETE  state changed
2019-01-10 05:47:41Z [test-stack-01.flavor]: CREATE_COMPLETE  state changed
2019-01-10 05:47:42Z [test-stack-01.router]: CREATE_COMPLETE  state changed
2019-01-10 05:47:43Z [test-stack-01.private_subnet]: CREATE_IN_PROGRESS  state changed
2019-01-10 05:47:43Z [test-stack-01.private_subnet]: CREATE_COMPLETE  state changed
2019-01-10 05:47:45Z [test-stack-01.router_interface]: CREATE_IN_PROGRESS  state changed
2019-01-10 05:47:45Z [test-stack-01.server_port]: CREATE_IN_PROGRESS  state changed
2019-01-10 05:47:48Z [test-stack-01.server_port]: CREATE_COMPLETE  state changed
2019-01-10 05:47:50Z [test-stack-01.router_interface]: CREATE_COMPLETE  state changed
2019-01-10 05:47:50Z [test-stack-01.server]: CREATE_IN_PROGRESS  state changed
2019-01-10 05:47:51Z [test-stack-01.server_floating_ip]: CREATE_IN_PROGRESS  state changed
2019-01-10 05:47:56Z [test-stack-01.server_floating_ip]: CREATE_COMPLETE  state changed
2019-01-10 05:48:25Z [test-stack-01.server]: CREATE_COMPLETE  state changed
2019-01-10 05:48:26Z [test-stack-01]: CREATE_COMPLETE  Stack CREATE completed successfully
+---------------------+--------------------------------------+
| Field               | Value                                |
+---------------------+--------------------------------------+
| id                  | 13396cca-14c9-4652-9ded-47505768eded |
| stack_name          | test-stack-01                        |
| description         | No description                       |
| creation_time       | 2019-01-10T05:47:36Z                 |
| updated_time        | None                                 |
| stack_status        | CREATE_COMPLETE                      |
| stack_status_reason | Stack CREATE completed successfully  |
+---------------------+--------------------------------------+
Heat Stack List
+--------------------------------------+---------------+-----------------+----------------------+--------------+
| ID                                   | Stack Name    | Stack Status    | Creation Time        | Updated Time |
+--------------------------------------+---------------+-----------------+----------------------+--------------+
| 13396cca-14c9-4652-9ded-47505768eded | test-stack-01 | CREATE_COMPLETE | 2019-01-10T05:47:36Z | None         |
| 03b83c0f-e621-4e3f-91c6-91b4480ed81c | public-net    | CREATE_COMPLETE | 2019-01-10T05:47:22Z | None         |
+--------------------------------------+---------------+-----------------+----------------------+--------------+
Nova Server List
+---------------------------+---------------------------+--------+----------------------------+---------------------+
| ID                        | Name                      | Status | Networks                   | Image Name          |
+---------------------------+---------------------------+--------+----------------------------+---------------------+
| 7b29b859-0870-4982-bb2d-  | test-stack-01-server-     | ACTIVE | test-stack-01-private_net- | Cirros 0.3.5 64-bit |
| 0ccd09202507              | 6r54bcqkovyd              |        | zzemq7qlmvto=10.11.11.11,  |                     |
|                           |                           |        | 172.24.8.2                 |                     |
+---------------------------+---------------------------+--------+----------------------------+---------------------+
Configuring required network settings
+ install -m 0700 -d /root/.ssh
+ ssh-keyscan $'172.24.8.2\r'
:22 SSH-2.0-dropbear_2012.55
:22 SSH-2.0-dropbear_2012.55
:22 SSH-2.0-dropbear_2012.55
\n'rintf 'The test VM is accessible via SSH:  ssh -i id_rsa cirros@172.24.8.2
The test VM is accessible via SSH:  ssh -i id_rsa cirros@172.24.8.2
+ publish_horizon_dashboard
+ kubectl -n openstack expose service/horizon-int --type=NodePort --name=horizon-dashboard
service "horizon-dashboard" exposed
+ print_shipyard_info1
++ awk '/^data:/ {print $2}' /root/deploy/airship-in-a-bottle/deployment_files/site/demo/secrets/passphrases/ucp_shipyard_keystone_password.yaml
+ SHIPYARD_KEYSTONE_PASS=password18
+ set +x
 
The .yaml files in /root/deploy contain the site design that may be suitable for use with Shipyard. 
The Shipyard Keystone password password18 may be found in /root/deploy/airship-in-a-bottle/deployment_files/site/demo/secrets/passphrases/ucp_shipyard_keystone_password.yaml
 
+ print_shipyard_info2
+ set +x
 
/root/deploy/site is set up with creds.sh which can be sourced to set up credentials for use in running Shipyard
/root/deploy/site contains .yaml files that represent the single-node site deployment. (deployment_files.yaml, certificates.yaml)

出力にあるように、172.24.8.2のアドレスでインスタンスにsshログインできるのがわかります。しかし、これ、どこで動いているのでしょうか。kubectlコマンドを使って確認してみます。

# kubectl get no
NAME        STATUS    ROLES     AGE       VERSION
dl360g7n4   Ready     <none>    4h        v1.10.2

dl360g7n4という名前のサーバー上でKubernetes Workerが動いているようです。 次はPodを確認してみます。

# kubectl get po
NAME                            READY     STATUS      RESTARTS   AGE
log-test-dl360g7n4-1531981492   0/1       Completed   0          1h

あれ、一つしか現れませんでした。ネームスペースで分離しているようです。--all-namespacesオプションを付加してみましょう。

ネームスペースkube-systemでKubernetesが展開されています。ucpというネームスペースでUnderCloudが展開されます。UnderCloudの中でMAASが動いているのが面白いところです。 openstackというネームスペースでいわゆるOverCloudが動作しているという格好です。

それでは以上を前提としてコマンドの出力結果を見てみましょう。

# kubectl get po --all-namespaces
NAMESPACE     NAME                                                        READY     STATUS      RESTARTS   AGE
default       log-test-dl360g7n4-1531981492                               0/1       Completed   0          2h
kube-system   auxiliary-etcd-dl360g7n4                                    3/3       Running     0          2h
kube-system   calico-etcd-anchor-tth2k                                    1/1       Running     0          2h
kube-system   calico-etcd-dl360g7n4                                       1/1       Running     0          2h
kube-system   calico-kube-policy-controllers-5df8bcbfc6-62rrz             1/1       Running     0          2h
kube-system   calico-node-sdj44                                           2/2       Running     0          2h
kube-system   calico-settings-5hrx2                                       0/1       Completed   0          2h
kube-system   coredns-5d7c9d97dc-5htg5                                    1/1       Running     0          2h
kube-system   coredns-5d7c9d97dc-wwlsf                                    1/1       Running     0          2h
kube-system   haproxy-dl360g7n4                                           1/1       Running     0          2h
kube-system   ingress-9sww9                                               1/1       Running     0          2h
kube-system   ingress-error-pages-6fd89c8f45-88f7r                        1/1       Running     0          2h
kube-system   ingress-error-pages-6fd89c8f45-rmwhq                        1/1       Running     0          2h
kube-system   kubernetes-apiserver-anchor-z5jbr                           1/1       Running     0          2h
kube-system   kubernetes-apiserver-dl360g7n4                              1/1       Running     0          2h
kube-system   kubernetes-controller-manager-anchor-xhw9c                  1/1       Running     0          2h
kube-system   kubernetes-controller-manager-dl360g7n4                     1/1       Running     0          2h
kube-system   kubernetes-etcd-anchor-fkgf2                                1/1       Running     0          2h
kube-system   kubernetes-etcd-dl360g7n4                                   1/1       Running     0          2h
kube-system   kubernetes-proxy-27sdj                                      1/1       Running     0          2h
kube-system   kubernetes-scheduler-anchor-qcp76                           1/1       Running     0          2h
kube-system   kubernetes-scheduler-dl360g7n4                              1/1       Running     0          2h
kube-system   nfs-provisioner-7799d64d59-nc9st                            1/1       Running     0          2h
kube-system   tiller-deploy-5d5fb6c54b-hgtn6                              1/1       Running     0          2h
openstack     airship-openstack-memcached-memcached-5464569895-fptss      1/1       Running     0          1h
openstack     airship-rabbitmq-rabbitmq-0                                 1/1       Running     0          1h
openstack     glance-api-698c8bff4c-9w67q                                 1/1       Running     0          1h
openstack     glance-bootstrap-b6lkz                                      0/1       Completed   0          1h
openstack     glance-db-init-7bwdc                                        0/1       Completed   0          1h
openstack     glance-db-sync-dxw9c                                        0/1       Completed   0          1h
openstack     glance-ks-endpoints-gxclb                                   0/3       Completed   0          1h
openstack     glance-ks-service-fjqsg                                     0/1       Completed   0          1h
openstack     glance-ks-user-lptpt                                        0/1       Completed   0          1h
openstack     glance-rabbit-init-sfvdq                                    0/1       Completed   0          1h
openstack     glance-registry-5466c88794-5xpdc                            1/1       Running     0          1h
openstack     glance-storage-init-pwqwv                                   0/1       Completed   0          1h
openstack     heat-api-67bddd699c-4qvmx                                   1/1       Running     0          1h
openstack     heat-bootstrap-b4nrz                                        0/1       Completed   0          1h
openstack     heat-cfn-795d5f96c-ghlhh                                    1/1       Running     0          1h
openstack     heat-db-init-vvx8r                                          0/1       Completed   0          1h
openstack     heat-db-sync-8nn4l                                          0/1       Completed   0          1h
openstack     heat-domain-ks-user-6jd28                                   0/1       Completed   0          1h
openstack     heat-engine-6fbff5f44-z46bc                                 1/1       Running     0          1h
openstack     heat-engine-cleaner-1531988400-9hjm2                        0/1       Completed   0          10m
openstack     heat-engine-cleaner-1531988700-gmfzb                        0/1       Completed   0          5m
openstack     heat-engine-cleaner-1531989000-xbjwk                        0/1       Completed   0          45s
openstack     heat-ks-endpoints-hwncq                                     0/6       Completed   0          1h
openstack     heat-ks-service-58m9k                                       0/2       Completed   0          1h
openstack     heat-ks-user-b8k26                                          0/1       Completed   0          1h
openstack     heat-rabbit-init-r5c4w                                      0/1       Completed   0          1h
openstack     heat-trustee-ks-user-p75nd                                  0/1       Completed   0          1h
openstack     heat-trusts-96vk2                                           0/1       Completed   0          1h
openstack     horizon-7548c8549d-8h24m                                    1/1       Running     0          1h
openstack     horizon-db-init-bxg7s                                       0/1       Completed   0          1h
openstack     horizon-db-sync-v46cw                                       0/1       Completed   0          1h
openstack     ingress-69c47846b4-qjttg                                    1/1       Running     0          1h
openstack     ingress-error-pages-7764d64996-mhz4p                        1/1       Running     0          1h
openstack     keystone-api-675dc44899-9v9ws                               1/1       Running     0          1h
openstack     keystone-bootstrap-m6mxq                                    0/1       Completed   0          1h
openstack     keystone-credential-setup-8x2tp                             0/1       Completed   0          1h
openstack     keystone-db-init-8fns4                                      0/1       Completed   0          1h
openstack     keystone-db-sync-77thm                                      0/1       Completed   0          1h
openstack     keystone-domain-manage-hd25j                                0/1       Completed   0          1h
openstack     keystone-fernet-setup-8wz6t                                 0/1       Completed   0          1h
openstack     keystone-rabbit-init-5599l                                  0/1       Completed   0          1h
openstack     libvirt-c8d5c                                               1/1       Running     0          1h
openstack     mariadb-ingress-75c6f99b74-8xxv7                            1/1       Running     0          1h
openstack     mariadb-ingress-error-pages-648f9b5f9b-7tmd5                1/1       Running     0          1h
openstack     mariadb-server-0                                            1/1       Running     0          1h
openstack     neutron-db-init-cvk5h                                       0/1       Completed   0          1h
openstack     neutron-db-sync-wr9sc                                       0/1       Completed   0          1h
openstack     neutron-dhcp-agent-default-pqbjd                            1/1       Running     0          1h
openstack     neutron-ks-endpoints-sdlfk                                  0/3       Completed   0          1h
openstack     neutron-ks-service-2h5hl                                    0/1       Completed   0          1h
openstack     neutron-ks-user-cgfpj                                       0/1       Completed   0          1h
openstack     neutron-l3-agent-default-ccspq                              1/1       Running     0          1h
openstack     neutron-metadata-agent-default-kj5px                        1/1       Running     0          1h
openstack     neutron-ovs-agent-default-czrxd                             1/1       Running     0          1h
openstack     neutron-rabbit-init-dkc2v                                   0/1       Completed   0          1h
openstack     neutron-server-74c95844d5-f2j2m                             1/1       Running     0          1h
openstack     nova-api-metadata-7c646f9b5f-r95t5                          1/1       Running     1          1h
openstack     nova-api-osapi-5c99b76c8-8zsp9                              1/1       Running     0          1h
openstack     nova-bootstrap-mpbsd                                        0/1       Completed   0          1h
openstack     nova-cell-setup-1531983600-pwfp2                            0/1       Completed   0          1h
openstack     nova-cell-setup-1531987200-rl6hb                            0/1       Completed   0          30m
openstack     nova-cell-setup-md9x7                                       0/1       Completed   0          1h
openstack     nova-compute-default-8q5h7                                  1/1       Running     0          1h
openstack     nova-conductor-5479756f65-k27rc                             1/1       Running     0          1h
openstack     nova-consoleauth-86b65f65df-42z6z                           1/1       Running     0          1h
openstack     nova-db-init-lgv4x                                          0/3       Completed   0          1h
openstack     nova-db-sync-8lztb                                          0/1       Completed   0          1h
openstack     nova-ks-endpoints-xtzcm                                     0/3       Completed   0          1h
openstack     nova-ks-service-2tr6d                                       0/1       Completed   0          1h
openstack     nova-ks-user-k7tlg                                          0/1       Completed   0          1h
openstack     nova-novncproxy-647b57cfd5-87j9v                            1/1       Running     0          1h
openstack     nova-placement-api-867c84d996-wgnhd                         1/1       Running     0          1h
openstack     nova-rabbit-init-zgzzp                                      0/1       Completed   0          1h
openstack     nova-scheduler-6fc56478d5-qwl96                             1/1       Running     0          1h
openstack     openvswitch-db-2bddz                                        1/1       Running     0          1h
openstack     openvswitch-vswitchd-p9k2z                                  1/1       Running     0          1h
openstack     placement-ks-endpoints-4l5wd                                0/3       Completed   0          1h
openstack     placement-ks-service-nsbzq                                  0/1       Completed   0          1h
openstack     placement-ks-user-z7622                                     0/1       Completed   0          1h
ucp           airflow-db-init-987ws                                       0/1       Completed   1          2h
ucp           airflow-db-sync-sr58b                                       0/1       Completed   0          2h
ucp           airflow-flower-5b684bbc65-g7ztm                             1/1       Running     0          2h
ucp           airflow-scheduler-778cbbdcb5-gwbrb                          1/1       Running     0          2h
ucp           airflow-web-857bdd85cc-ft84t                                1/1       Running     0          2h
ucp           airflow-worker-0                                            2/2       Running     1          2h
ucp           airship-ucp-keystone-memcached-memcached-6d58bd86b4-j5zdz   1/1       Running     0          2h
ucp           airship-ucp-rabbitmq-rabbitmq-0                             1/1       Running     0          2h
ucp           armada-api-864fd9d6c9-rckwh                                 1/1       Running     0          2h
ucp           armada-ks-endpoints-rpb6v                                   0/3       Completed   0          2h
ucp           armada-ks-service-9jbwx                                     0/1       Completed   0          2h
ucp           armada-ks-user-g4mtx                                        0/1       Completed   0          2h
ucp           barbican-api-75588b8cbb-9sw9f                               1/1       Running     0          2h
ucp           barbican-db-init-2vgrv                                      0/1       Completed   0          2h
ucp           barbican-db-sync-lfgm4                                      0/1       Completed   0          2h
ucp           barbican-ks-endpoints-7njsg                                 0/3       Completed   0          2h
ucp           barbican-ks-service-tpnmx                                   0/1       Completed   0          2h
ucp           barbican-ks-user-sk7d7                                      0/1       Completed   0          2h
ucp           barbican-rabbit-init-2rxhn                                  0/1       Completed   0          2h
ucp           deckhand-api-6f89495bc8-s2cpk                               1/1       Running     0          2h
ucp           deckhand-db-init-k747s                                      0/1       Completed   1          2h
ucp           deckhand-db-sync-zh4k2                                      0/1       Completed   0          2h
ucp           deckhand-ks-endpoints-tbr8c                                 0/3       Completed   0          2h
ucp           deckhand-ks-service-5k2jc                                   0/1       Completed   0          2h
ucp           deckhand-ks-user-v95kw                                      0/1       Completed   0          2h
ucp           drydock-api-64d868d9bb-srsw6                                1/1       Running     0          2h
ucp           drydock-db-init-6j9bg                                       0/1       Completed   0          2h
ucp           drydock-db-sync-trdcz                                       0/1       Completed   0          2h
ucp           drydock-ks-endpoints-g6sm6                                  0/3       Completed   0          2h
ucp           drydock-ks-service-5plhf                                    0/1       Completed   0          2h
ucp           drydock-ks-user-kw7ld                                       0/1       Completed   0          2h
ucp           ingress-7b8bf78d89-5b5g5                                    1/1       Running     0          2h
ucp           ingress-error-pages-5877dd4699-zkjgf                        1/1       Running     0          2h
ucp           keystone-api-79d98f878-brlfh                                1/1       Running     0          2h
ucp           keystone-bootstrap-xpph4                                    0/1       Completed   0          2h
ucp           keystone-credential-setup-5lzs8                             0/1       Completed   0          2h
ucp           keystone-db-init-249bx                                      0/1       Completed   0          2h
ucp           keystone-db-sync-dcvcc                                      0/1       Completed   0          2h
ucp           keystone-domain-manage-h6nt8                                0/1       Completed   0          2h
ucp           keystone-fernet-setup-6v958                                 0/1       Completed   0          2h
ucp           keystone-rabbit-init-jf68v                                  0/1       Completed   0          2h
ucp           maas-bootstrap-admin-user-fw5t9                             0/1       Completed   0          2h
ucp           maas-db-init-5dkvz                                          0/1       Completed   0          2h
ucp           maas-db-sync-rzjd4                                          0/1       Completed   0          2h
ucp           maas-export-api-key-9hgjj                                   0/1       Completed   0          2h
ucp           maas-import-resources-b8djl                                 0/1       Completed   1          2h
ucp           maas-rack-75969f9548-hc4ld                                  1/1       Running     0          2h
ucp           maas-region-0                                               1/1       Running     0          2h
ucp           mariadb-ingress-6c9dcbc755-b6gbw                            1/1       Running     0          2h
ucp           mariadb-ingress-error-pages-b7f9f85c7-t5z5g                 1/1       Running     0          2h
ucp           mariadb-server-0                                            1/1       Running     0          2h
ucp           postgresql-0                                                1/1       Running     0          2h
ucp           promenade-api-5b89bf556f-t4m9b                              1/1       Running     0          2h
ucp           promenade-ks-endpoints-q7f22                                0/3       Completed   0          2h
ucp           promenade-ks-service-w7rfk                                  0/1       Completed   0          2h
ucp           promenade-ks-user-4xnqp                                     0/1       Completed   0          2h
ucp           shipyard-api-695df5559b-dmbdk                               1/1       Running     0          2h
ucp           shipyard-db-init-cdfht                                      0/1       Completed   0          2h
ucp           shipyard-db-sync-dhzqh                                      0/1       Completed   0          2h
ucp           shipyard-ks-endpoints-t4hw9                                 0/3       Completed   0          2h
ucp           shipyard-ks-service-mvpxh                                   0/1       Completed   0          2h
ucp           shipyard-ks-user-42jgw                                      0/1       Completed   0          2h

そのほかの情報も出力されていたので貼り付けてみます。

----------------------------------------------------------------------------------
The following commands will execute Shipyard to setup and run a deploy_site action
----------------------------------------------------------------------------------
cd /root/deploy/site
source creds.sh
./run_shipyard.sh create configdocs design --filename=/home/shipyard/host/deployment_files.yaml
./run_shipyard.sh create configdocs secrets --filename=/home/shipyard/host/certificates.yaml --append
./run_shipyard.sh commit configdocs
./run_shipyard.sh create action deploy_site
 
-----------
Other Notes
-----------
If you need to run Armada directly to deploy charts (fix something broken?), the following may be of use:
export ARMADA_IMAGE=quay.io/airshipit/armada
docker run -t -v ~/.kube:/armada/.kube -v /root/deploy/site:/target --net=host ${ARMADA_IMAGE} apply /target/your-yaml.yaml
 
+ print_dashboards
++ kubectl -n ucp get service airflow-web-int -o 'jsonpath={.spec.ports[0].nodePort}'
+ AIRFLOW_PORT=30004
++ kubectl -n openstack get service horizon-dashboard -o 'jsonpath={.spec.ports[0].nodePort}'
+ HORIZON_PORT=32479
++ kubectl -n ucp get service maas-region-ui -o 'jsonpath={.spec.ports[0].nodePort}'
Error from server (NotFound): services "maas-region-ui" not found
+ MAAS_PORT=
++ awk '/^data:/ {print $2}' /root/deploy/airship-in-a-bottle/deployment_files/site/demo/secrets/passphrases/ucp_maas_admin_password.yaml
+ MASS_PASS=password12
+ set +x
 
OpenStack Horizon dashboard is available on this host at the following URL:
 
  http://172.17.28.68:32479
 
Credentials:
  Domain: default
  Username: admin
  Password: password
 
OpenStack CLI commands could be launched via `./run_openstack_cli.sh` script, e.g.:
  # cd /root/deploy/airship-in-a-bottle/manifests/dev_single_node
  # ./run_openstack_cli.sh stack list
  ...
  
Other dashboards:
 
  MAAS: http://172.17.28.68:/MAAS/ admin/password12
  Airship Shipyard Airflow DAG: http://172.17.28.68:30004/
 
Airship itself does not have a dashboard.
 
Other endpoints and credentials are listed in the following locations:
  /root/deploy/airship-in-a-bottle/deployment_files/global/v1.0demo/software/config/endpoints.yaml
  /root/deploy/airship-in-a-bottle/deployment_files/site/demo/secrets/passphrases/
Exposed ports of services can be listed with the following command:
  # kubectl get services --all-namespaces | grep -v ClusterIP
  ...
 
+ your_next_steps
+ set +x
 
---------------------------------------------------------------
 
Airship has completed deployment of OpenStack (OpenStack-Helm).
 
Explore Airship Treasuremap repository and documentation
available at the following URLs:
 
  https://github.com/openstack/airship-treasuremap
  https://airship-treasuremap.readthedocs.io/
 
---------------------------------------------------------------
 
+ clean
+ set +x
To remove files generated during this script's execution, delete /root/deploy.
This VM is disposable. Re-deployment in this same VM will lead to unpredictable results.

Airshipについて詳しくは、次のサイトの情報や動画をご覧ください。

superuser.openstack.org

以上、Kubernetsの上でOpenStackって動くんだ...という話でした。

[2018/7/30 追記]

env -i ./run_openstack_cli.shを実行することで、OverCloudのOpenStackでopenstackコマンドを実行できます。このコマンドを実行する前に、OpenStackクライアントの導入が必要です。

# env -i ./run_openstack_cli.sh server list
+------------------------------------+-----------------------------------+--------+-------------------------------------+---------------------+
| ID                                 | Name                              | Status | Networks                            | Image Name          |
+------------------------------------+-----------------------------------+--------+-------------------------------------+---------------------+
| fb227520-b79f-4c1e-a41f-           | test-stack-01-server-3gne47m4uclb | ACTIVE | test-stack-01-private_net-          | Cirros 0.3.5 64-bit |
| 9c59ff146543                       |                                   |        | zpcwvtcbz7om=10.11.11.11,           |                     |
|                                    |                                   |        | 172.24.4.5                          |                     |
+------------------------------------+-----------------------------------+--------+-------------------------------------+---------------------+

# env -i ./run_openstack_cli.sh image list
+--------------------------------------+---------------------+--------+
| ID                                   | Name                | Status |
+--------------------------------------+---------------------+--------+
| 64b775b9-e6c7-4b90-a487-9b62e481ada4 | Cirros 0.3.5 64-bit | active |
+--------------------------------------+---------------------+--------+

[2019/1/10 追記]

Kubernetesの上に構築したアプリケーションのアクセスは次の通り。

# kubectl get services --all-namespaces | grep -v ClusterIP
NAMESPACE     NAME                          TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)                              AGE
openstack     horizon-dashboard             NodePort    10.96.238.196   <none>        80:32479/TCP                         11m
ucp           airflow-web-int               NodePort    10.96.228.37    <none>        8080:30004/TCP                       59m
ucp           shipyard-int                  NodePort    10.96.18.132    <none>        9000:30003/TCP                       59m

LocalIP:NodePortでアクセスできる。

各種のアクセス方法について

OpenStackのDashboardは...

f:id:virtualtech:20190110151746p:plain:w360

Dashboardにログインしてみたい場合は、airship-in-a-bottle.shを実行していた時の標準出力もしくは以下のファイルに、認証に必要な情報が書かれているのでそれを見る。

/root/deploy/airship-in-a-bottle/manifests/dev_single_node/openstack_cli_docker_base_command.sh

Airflowは...

f:id:virtualtech:20190110151823p:plain:w360

こちらは認証なしでアクセス可能。

ベースに利用したKubernetesは...

クラスターの情報
# kubectl cluster-info
Kubeconfig

クレデンシャルファイルは、/root/.kube/configに存在する。

# kubectl config view