このページの翻訳:
- 日本語 (ja)
- English (en)
最近の更新
- 2024.01.18 RailsでSSLエラー 以前のリビジョンを復元 (2024/01/18 07:06)
- 31 CentOS5 TLS1.2 created
- 2024.04.12 MySQL BIT Field created
最近の更新
文書の過去の版を表示しています。
JuJu+MaasでOpenStackをデプロイしてみる。
今回はUbuntuサーバに、KVMをれ入れて下記の5VMを立てて検証してみる。
hostname | external | internal | tag |
---|---|---|---|
MAAS | 192.168.0.110 | 10.10.0.110 | |
juju-controller | DHCP | bootstrap | |
node01 | DHCP | node01 | |
node02 | DHCP | node02 | |
node03 | DHCP | node03 |
Nic | PXE | Network | DHCP | Gateway | Space |
---|---|---|---|---|---|
ens3 | ○ | 192.168.0.0/24 | MAAS-DHCP | 192.168.0.254 | internal |
ens4 | 10.10.0.0/24 | No DHCP | 10.10.0.254 | external |
Maasとは、Metal-as-a-Serviceでベアメタルを提供するサービス
$ sudo apt -y update $ sudo apt -y upgrade
$ sudo apt install maas
$ sudo maas init [sudo] password for matsui: Note: Configuring the MAAS snap in "all" mode will be deprecated in MAAS 2.8.0 and removed in 2.9.0. See https://maas.io/deprecations/MD1 for details. Mode (all/region+rack/region/rack/none) [default=all]? MAAS URL [default=http://192.168.0.110:5240/MAAS]: Create first admin account Username: admin Password: Again: Email: hoge@hogehoge.com Import SSH keys [] (lp:user-id or gh:user-id):
これでhttp://192.168.0.110:5240/MAASからUIにアクセスできる。
JujuはCanonical社が提供するプロビジョニングツール
JuJuはMaasに接続して、MaasのMetalサーバを利用し様々なアプリケーションをデプロイする。
sudo snap install juju --classic
$ vim mymaas.yaml clouds: maas-server: type: maas auth-types: [oauth1] endpoint: http://192.168.0.110:5240/MAAS
juju add-cloud maas-server mymaas.yaml
$ juju add-credential maas-server This operation can be applied to both a copy on this client and to the one on a controller. No current controller was detected and there are no registered controllers on this client: either bootstrap one or register one. Enter credential name: maas-server-credential Regions default Select region [any region, credential is not region specific]: Using auth-type "oauth1". Enter maas-oauth: Credential "maas-server-credential" added locally for cloud "maas-server".
credentialが見えればOK
$ juju credentials No credentials from any controller to display. Client Credentials: Cloud Credentials maas-server maas-server-credential
matsui@maasvm2:~$ juju clouds Only clouds with registered credentials are shown. There are more clouds, use --all to see them. You can bootstrap a new controller using one of these clouds... Clouds available on the client: Cloud Regions Default Type Credentials Source Description localhost 1 localhost lxd 0 built-in LXD Container Hypervisor maas-server 1 default maas 1 local Metal As A Service
juju からの命令を受けて処理するノード
デプロイには結構時間がかかる。
$ juju bootstrap --constraints tags=bootstrap maas-server maas Creating Juju controller "maas" on maas-server/default Looking for packaged Juju agent version 2.9.22 for amd64 Located Juju agent version 2.9.22-ubuntu-amd64 at https://streams.canonical.com/juju/tools/agent/2.9.22/juju-2.9.22-ubuntu-amd64.tgz Launching controller instance(s) on maas-server/default... - 4t8t4s (arch=amd64 mem=16G cores=8) Installing Juju agent on bootstrap instance Fetching Juju Dashboard 0.8.1