https://maas.io/
os install
install ubuntu 20.04 LTS with CD
Copy sudo apt update -y
sudo apt upgrade -y
sudo apt dist-upgrade -y
ipmi ์ค์
Copy sudo apt install ipmitool -y
ip = 10.1.4.11
sudo ipmitool lan set 1 ipsrc static
sudo ipmitool lan set 1 ipaddr ${ip}
sudo ipmitool lan set 1 netmask 255.255.255.0
sudo ipmitool lan set 1 defgw ipaddr 10.1.4.1
sudo ipmitool lan set 1 arp respond on
ip setting
Copy sudo vi /etc/netplan/00-installer-config.yaml
Copy network :
ethernets :
eno1 :
addresses :
- 10.1.5.11/24
gateway4 : 10.1.5.1
nameservers :
addresses :
- 4.2.2.2
search : []
eno2 :
dhcp4 : true
version : 2
Copy sudo netplan apply
ifconfig #ํ์ธ
snap and postgresql install
Copy sudo snap install --channel=3.0/stable maas
sudo apt install -y postgresql
MAAS_DBUSER = XXXXXXX
MAAS_DBPASS = XXXXXXX
MAAS_DBNAME = maas
sudo -u postgres psql -c "CREATE USER \"$MAAS_DBUSER\" WITH ENCRYPTED PASSWORD '$MAAS_DBPASS'"
sudo -u postgres createdb -O "$MAAS_DBUSER" "$MAAS_DBNAME"
Copy sudo vi /etc/postgresql/12/main/pg_hba.conf
Copy # host $MAAS_DBNAME $MAAS_DBUSER 0/0 md5
host maas XXXX 0/0 md5
Copy sudo maas init region+rack --database-uri "postgres://$MAAS_DBUSER:$MAAS_DBPASS@localhost/$MAAS_DBNAME"
#sudo maas init region+rack --database-uri "postgres://$MAAS_DBUSER:$MAAS_DBPASS@$HOSTNAME/$MAAS_DBNAME"
MASS URL : (just enter )
๊ฒฐ๊ณผ
Copy MAAS URL [default=http://10.1.5.11:5240/MAAS]:
MAAS has been set up.
If you want to configure external authentication or use
MAAS with Canonical RBAC, please run
sudo maas configauth
To create admins when not using external authentication, run
sudo maas createadmin
Copy sudo maas status
> bind9 RUNNING pid 8142, uptime 0:02:21
> dhcpd STOPPED Not started
> dhcpd6 STOPPED Not started
> http RUNNING pid 8411, uptime 0:00:46
> ntp RUNNING pid 8327, uptime 0:00:51
> proxy RUNNING pid 8486, uptime 0:00:39
> rackd RUNNING pid 8145, uptime 0:02:21
> regiond RUNNING pid 8146, uptime 0:02:21
> syslog RUNNING pid 8324, uptime 0:00:51
add admin
Copy sudo maas createadmin --username=admin --email=smiley@yourdomain.com
> YourPassword
Import SSH keys [] ( lp:user-id or gh:user-id ): ( just enter )
์น ๋ธ๋ผ์ฐ์ ธ
http://10.1.5.11:5240/MAAS/ (๋์๋ฌธ์ ์ฃผ์)
continue
upload ssh key import
์ด๊ธฐ ์ ์ ssh key๋ฅผ ์ค์ ํ๋ค. ์ค์ํ๋ค.
continue
Copy cat ~/.ssh/id_rsa.pub
> ssh-rsa AAxxx0RVSJOdOBSeO7e
dhcp๋ฅผ enable
subnet >> click
untagged click
enable dhcp ํด๋ฆญ
Copy sudo maas status
bind9 RUNNING pid 19886, uptime 0:09:28
dhcpd RUNNING pid 20664, uptime 0:00:49
dhcpd6 STOPPED Not started
http RUNNING pid 20198, uptime 0:07:34
ntp RUNNING pid 20085, uptime 0:07:43
proxy RUNNING pid 20602, uptime 0:02:28
rackd RUNNING pid 19889, uptime 0:09:28
regiond RUNNING pid 19890, uptime 0:09:28
syslog RUNNING pid 20084, uptime 0:07:43
dhcp๊ฐ ์คํ์ค์์ ํ์ธํ ์ ์๋ค.
image ๋ค์ด๋ก๋
http://10.1.5.11:5240/MAAS/l/images
sync์์ ํ์ธํ ์ ์๋ค.
์๋
ธ๋ ์ค์น
๋
ธ๋ ๋ถํ
์์๋ฅผ pxe๋ฅผ 1๋ฒ์ผ๋ก ํด๋๋ฉด ์๋์ผ๋ก maas์์ ์ด๋ฏธ์ง๋ฅผ ๋ฐ์์ ์ค์นํ๋ค. ์น ํ๋ฉด์์๋ ์๋ ๋ฑ๋ก์ด ๋๋ค.
์๋์ผ๋ก ๋ฑ๋ก๋๋ฉฐ commissioning๊น์ง ๋๋ค. commsioning์ด ์คํจํ๋ฉด new ๋ก ๋๊ณ ํต๊ณผํ๋ฉด ready๊ฐ ๋๋ค.
์ํ๋ฅผ ์ค๋ช
ํ๋ฉด ์๋์ ๊ฐ๋ค.
Copy new -> commissioning -> ready -> deploy
new ์ํ๋ก ๊ฐ๋ค.
--> commisioning์ ์ถ๊ฐ๋ก ํด๋ณด์.
--> ready์ํ์
์ด๋ฆ ๋ฐ๊พธ๊ณ ip๋ฅผ ์ง์ ์ ํด๋ณด์.
install os
์ด์ deploy๋ฅผ ํด๋ณด์.
์ฅ๋น๋ฅผ ์ ํํ๊ณ deploy๋ฅผ ๋๋ฅด๋ฉด ๋๋ค.
bearmetal์ฅ๋น์ด๋ฏ๋ก kvm๋ ๊ฐ์ด ์ค์น๊ฐ ๋๊ฒ ํด๋์๋ค.
๋ํ๋ก์ด ํด๋ณด์.
์ ์ค์น ๋์๋ค.
vm๋ ์ค์น
๋
ธ๋ ์ด๋ฆ์ ๋๋ฅด๊ณ ๋ค์ด๊ฐ์ compose๋ฅผ ๋๋ฅธ๋ค.
memory , core , harddisk ์ค์ ์ ํด๋ณด์.
์์ฑํ์.
machine ๋ฉ๋ด๋ก ๊ฐ๋ณด์.
์๋ก ์์ฑ๋ vm์ด ์ ์ฅ๋น๋ก ๋ณด์ด๊ณ commisioning์ด ์์๋์๋ค.
ready์ํ๋ก ๋ฐ๋๊ณ ๋ํ๋ก์ด๋ฅผ ๋๊ธฐํ๋ค.
์ด์ os๋ฅผ deploy ํ๋ฉด ๋๋ค.
์๋ฃํ ์ ์ํด๋ณด์ ubuntu์ ์ ์ ์ด๊ธฐ์ ๋ฑ๋กํ ssh key๋ก ์ ์์ด ๊ฐ๋ฅํ๋ค.
Last updated 11 months ago