ユーザ用ツール

サイト用ツール


サイドバー

このページの翻訳:



最近の更新



Tag Cloud

01_linux:08_仮想化:juju:01_juju_maas_openstack

文書の過去の版を表示しています。


01 JuJu Maas Openstack

JuJu+MaasでOpenStackをデプロイしてみる。
今回はUbuntuサーバに、KVMをれ入れて下記の5VMを立てて検証してみる。

hostname external internal tag
MAAS 192.168.0.11010.10.0.110
juju-controller DHCP bootstrap
node01 DHCPnode01
node02 DHCPnode02
node03 DHCPnode03
NicPXENetworkDHCP Gateway Space
ens3192.168.0.0/24MAAS-DHCP 192.168.0.254 internal
ens4 10.10.0.0/24No DHCP 10.10.0.254 external

01. Maas Install

Maasとは

Maasとは、Metal-as-a-Serviceでベアメタルを提供するサービス

apt upgrade

$ sudo apt -y update
$ sudo apt -y upgrade

maas install

$ sudo apt install maas

maas init

$ 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):

UI

これでhttp://192.168.0.110:5240/MAASからUIにアクセスできる。

  • ログイン後、Ubuntu imageで20.04 LTSを選択し、Update selectionをクリック
  • SSH keyをアップロードしておく
  • Subnetsから、192.168.0.0/24ネットワークを選んでDHCPを有効にしておく

02. JuJu

JuJuとは

JujuはCanonical社が提供するプロビジョニングツール
JuJuはMaasに接続して、MaasのMetalサーバを利用し様々なアプリケーションをデプロイする。

juju install

sudo snap install juju --classic

03. jujuにMaas登録

Yaml用意

$ 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

MaasのAPIキー登録

$ 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".

APIキーは下記MAASのUIからコピー

credential確認

credentialが見えればOK

$ juju credentials
No credentials from any controller to display.

Client Credentials:
Cloud        Credentials
maas-server  maas-server-credential

MAASの登録確認

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
01_linux/08_仮想化/juju/01_juju_maas_openstack.1643870602.txt.gz · 最終更新: 2022/02/03 15:43 by matsui