Here are installation logs when installing MAAS within KVM.
referred to http://maas.ubuntu.com/docs/about.html.
MAAS stands for Metal as a Service.
There are three key components,
region controller ( web UI, API )
cluster
nodes
I have installed these three components on the same server.
Here are trial and error logs when installing Ubuntu 13.10 MAAS within KVM.
KVM host
# tail -1 /etc/lsb-release ;uname -ri
DISTRIB_DESCRIPTION="Ubuntu 13.04"
3.8.0-33-generic x86_64
|
[ about the VM for MAAS ]
OS: ubuntu 13.10 server 64bit
vNIC*1
vCPU*2
vHDD: 25GB
Memory 2GB
download Ubuntu 13.10 server ISO and build the VM from that ISO.
select “install MAAS”
configure this box as a new MAAS
installing..
on the MAAS VM, enable serial console to log on to that via “virsh console”
root@maas01:~# cat /etc/init/ttyS0.conf
# tty3 - getty
#
# This service maintains a getty on tty3 from the point the system is
# started until it is shut down again.
start on runlevel [23] and (
not-container or
container CONTAINER=lxc or
container CONTAINER=lxc-libvirt)
stop on runlevel [!23]
respawn
exec /sbin/getty -8 115200 ttyS0
root@maas01:~#
root@maas01:~# grep ttyS0 /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash console=ttyS0,115200"
root@maas01:~# update-grub2 -o /boot/grub/grub.cfg
# reboot
|
confirm the MASS VM has the internet connectivity.
root@maas01:~# ping www.google.com -c 1
PING www.google.com (74.125.235.82) 56(84) bytes of data.
64 bytes from nrt19s01-in-f18.1e100.net (74.125.235.82): icmp_seq=1 ttl=52 time=7.56 ms
--- www.google.com ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 7.564/7.564/7.564/0.000 ms
|
after installing MAAS
access to http:// IP address/MAAS
root@maas01:~# lsof -ni:80
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
apache2 1263 root 4u IPv6 10138 0t0 TCP *:http (LISTEN)
apache2 1266 www-data 4u IPv6 10138 0t0 TCP *:http (LISTEN)
apache2 1267 www-data 4u IPv6 10138 0t0 TCP *:http (LISTEN)
|
needs to create an admin user for MAAS
on the CLI
# maas createsuperuser
Username (leave blank to use 'root'):
Email address: a@a
Error: Enter a valid email address.
Email address: a@foo.com
Password:
Password (again):
Superuser created successfully.
|
login
after logging onto the MAAS.
set up for maas-cli
on the GUI
click Preferences
get MAAS keys which is required to use maas-cli.
on the CLI, logon to MAAS.
could I log on ??
# maas-cli login maas http://127.0.0.1/MAAS/api/1.0
API key (leave empty for anonymous access):
You are now logged in to the MAAS server at
http://127.0.0.1/MAAS/api/1.0/ with the profile name 'maas'.
For help with the available commands, try:
maas-cli maas --help
root@ubuntu-maas01:~#
|
import boot image
root@maas01:~# maas-cli maas node-groups import-boot-images
Import of boot images started on all cluster controllers
root@maas01:~# maas-cli maas node-groups list
[
{
"cluster_name": "Cluster 254261ec-ea20-41ba-8fff-95f29cd1301f",
"status": 1,
"name": "master",
"uuid": "254261ec-ea20-41ba-8fff-95f29cd1301f"
}
]
|
it seems to take much(?) time to import boot image at first time…
list nodes.
root@ubuntu-maas01:~# maas-cli maas nodes accept-all
[]
root@ubuntu-maas01:~# maas-cli maas nodes list
[]
|
- cluster configuration
GUI -> click “cog” icon.
Cluster controllers..
no boot images..
seen from an output of tcpdump, maas seems to download boot images.
root@maas01:~# tcpdump -i eth0 -s 100 tcp | head -5
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 100 bytes
20::26:27.521889 IP danava.canonical.com.http > maas01.59987: Flags [.], seq 1585318336:1585321136, ack 2141727038, win 61, options [nop,nop,TS val 4079140638 ecr 2245310], length 2800
20::26:27.521908 IP maas01.59987 > danava.canonical.com.http: Flags [.], ack 2800, win 10894, options [nop,nop,TS val 2245379 ecr 4079140632], length 0
20::26:27.522051 IP danava.canonical.com.http > maas01.59987: Flags [.], seq 2800:5600, ack 1, win 61, options [nop,nop,TS val 4079140638 ecr 2245310], length 2800
20::26:27.522060 IP maas01.59987 > danava.canonical.com.http: Flags [.], ack 5600, win 10894, options [nop,nop,TS val 2245379 ecr 4079140638], length 0
20::26:27.522320: IP danava.canonical.com.http > maas01.59987: Flags [.], seq 5600:8400, ack 1, win 61, options [nop,nop,TS val 4079140638 ecr 2245310], length 2800
|
log
egrep boot_images /var/log/maas/ celery.log | grep -i succeeded | head -3
[2013-11-19 13:47:44,682: INFO/MainProcess] Task provisioningserver.tasks.report_boot_images[6ca07f25-a99e-4f21-a4b3-e085d5094842] succeeded in 0.0652940273285s: None
[2013-11-19 13:52:48,872: INFO/MainProcess] Task provisioningserver.tasks.report_boot_images[31fe31e4-02cf-4d18-b445-0d56ff43dab7] succeeded in 0.0771050453186s: None
[2013-11-19 13:57:48,930: INFO/MainProcess] Task provisioningserver.tasks.report_boot_images[7ebb7a43-2d7b-4963-aabe-049b75848ae4] succeeded in 0.0598390102386s: None
|
after succeeding in importing boot images, GUI shows:
add nodes via GUI
clieck “+ Add node”
add node called “test01”
after adding two nodes
on the CLI
root@maas01:~# maas-cli maas nodes list
[
{
"status": 1,
"macaddress_set": [
{
"resource_uri": "/MAAS/api/1.0/nodes/node-5829541c-50f1-11e3-8ce7-525400346a83/macs/aa:bb:cc:dd:ee:ff/",
"mac_address": "aa:bb:cc:dd:ee:ff"
}
],
"hostname": "test01",
"power_type": "",
"routers": null,
"netboot": true,
"cpu_count": 0,
"storage": 0,
"system_id": "node-5829541c-50f1-11e3-8ce7-525400346a83",
"architecture": "i386/generic",
"memory": 0,
"owner": null,
"tag_names": [],
"ip_addresses": [],
"resource_uri": "/MAAS/api/1.0/nodes/node-5829541c-50f1-11e3-8ce7-525400346a83/"
},
{
"status": 1,
"macaddress_set": [
{
"resource_uri": "/MAAS/api/1.0/nodes/node-8e340f8e-50f1-11e3-8ce7-525400346a83/macs/aa:bb:cc:dd:ee:fd/",
"mac_address": "aa:bb:cc:dd:ee:fd"
}
],
"hostname": "test02",
"power_type": "",
"routers": null,
"netboot": true,
"cpu_count": 0,
"storage": 0,
"system_id": "node-8e340f8e-50f1-11e3-8ce7-525400346a83",
"architecture": "i386/generic",
"memory": 0,
"owner": null,
"tag_names": [],
"ip_addresses": [],
"resource_uri": "/MAAS/api/1.0/nodes/node-8e340f8e-50f1-11e3-8ce7-525400346a83/"
}
]
|
how can I run these nodes?
seen from GUI message,
Node marked as using the default installer.
You can boot this node using Avahi-enabled boot media or an adequately configured DHCP server. See https://maas.ubuntu.com/docs/nodes.html for instructions.
I have not configured DHCP..
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.