User Tools

Site Tools


maas

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
maas [2016/12/15 11:50]
sgiulitti
maas [2016/12/16 12:11] (current)
sgiulitti
Line 39: Line 39:
 ###Note ###Note
 Ubuntu doesn't come with the standard naming interfaces like eth0 eth1 anymore Ubuntu doesn't come with the standard naming interfaces like eth0 eth1 anymore
-instead you will see ens3 ensp5s because of systemd renaming those.+instead you will see ens3 ens9 because of systemd renaming those.
 Let's assume the ens3 is the primary one and ensp5s the second one. Let's assume the ens3 is the primary one and ensp5s the second one.
  
 *Example interface configuration:* *Example interface configuration:*
 ```bash ```bash
-# The primary network interface (external)+# This file describes the network interfaces available on your system 
 +# and how to activate them. For more information, see interfaces(5). 
 + 
 +source /etc/network/interfaces.d/
 + 
 +# The loopback network interface 
 +auto lo 
 +iface lo inet loopback 
 + 
 +# The primary network interface
 auto ens3 auto ens3
 iface ens3 inet static iface ens3 inet static
-     address 192.168.122.157 + address 192.168.122.157 
-     netmask 255.255.255.0 + netmask 255.255.255.0 
-     # usually this is virb0 address created by the virtual + gateway 192.168.122.1 
-     # system that you are using mine is 192.168.122.1  + dns-nameservers 8.8.8.8 8.8.4.4
-     gateway 192.168.122.1 +
-     dns-nameservers 8.8.8.8+
  
-# The secondary NIC (used internal for MAAS)+# The secondary network interface 
 +# This is used for internal maas only
 auto ens9 auto ens9
 iface ens9 inet static iface ens9 inet static
-     address 10.10.10.10 + address 10.10.10.10 
-     netmask 255.255.255.0 + netmask 255.255.255.0 
-     dns-nameservers 8.8.8.8 +
-     dns-search maas +
-     post-up iptables -t nat -A POSTROUTING -o ens3 -j SNAT --to-source 192.168.122.157 +
-     post-down iptables -t nat -D POSTROUTING -o ens3 -j SNAT --to-source 192.168.122.157+
 ``` ```
  
Line 127: Line 132:
 sysctl -p sysctl -p
 ``` ```
-In this example eth0 is the public interface and eth1 is the private one+In this example ens3 is the public interface and ens9 is the private one
  
 ### Create admin user ### Create admin user
Line 133: Line 138:
   
 ```bash ```bash
-sudo maas-region-admin createadmin --username root --email user@server.com+# maas 2.0 
 +sudo maas-region createsuperuser
 ``` ```
  
Line 157: Line 163:
 Edit the default cluster and enable DHCP and DNS on the interface where you will be serving DHCP (see the screenshot as an example). Edit the default cluster and enable DHCP and DNS on the interface where you will be serving DHCP (see the screenshot as an example).
  
-Open `http://<maas-server-ip>/MAAS/clusters/` in a browser; **eth1** is most probably the one that needs to be configured.+Open `http://<maas-server-ip>/MAAS/clusters/` in a browser; **ens9** is most probably the one that needs to be configured.
   
 *Example:* *Example:*
-Router IP = eth1's IP* +Router IP = ens9's IP* 
-IP = eth1's IP+IP = ens9's IP
  
 ![Screenshot](http://wiki.cloudbase.it/_media/screen_shot_2014-04-23_at_01.27.08.png) ![Screenshot](http://wiki.cloudbase.it/_media/screen_shot_2014-04-23_at_01.27.08.png)
Line 182: Line 188:
 sudo chsh -s /bin/bash maas sudo chsh -s /bin/bash maas
 ``` ```
 +
 Generate a SSH keypair as the maas user (hit enter three times to accept the default path and empty password): Generate a SSH keypair as the maas user (hit enter three times to accept the default path and empty password):
 +```bash
 sudo -u maas ssh-keygen sudo -u maas ssh-keygen
 Generating public/private rsa key pair. Generating public/private rsa key pair.
Line 191: Line 199:
 Your identification has been saved in /home/maas/.ssh/id_rsa. Your identification has been saved in /home/maas/.ssh/id_rsa.
 Your public key has been saved in /home/maas/.ssh/id_rsa.pub. Your public key has been saved in /home/maas/.ssh/id_rsa.pub.
 +```
 Then add the public key to ~ubuntu/.ssh/authorized_keys on the vm server so virsh can use ssh without a password: Then add the public key to ~ubuntu/.ssh/authorized_keys on the vm server so virsh can use ssh without a password:
 ```bash ```bash
-sudo -u maas -i ssh-copy-id ubuntu@10.0.0.2+sudo -u maas -i ssh-copy-id ubuntu@192.168.122.1
 ``` ```
-As the maas user, test virsh commands against libvirt at 10.0.0.2:+As the maas user, test virsh commands against libvirt at 192.168.122.1:
 ```bash ```bash
-sudo -u maas virsh -c qemu+ssh://ubuntu@10.0.0.2/system list --all+sudo -u maas virsh -c qemu+ssh://ubuntu@192.168.122.1/system list --all
 ``` ```
 ###Set upstream DNS ###Set upstream DNS
maas.1481795448.txt.gz · Last modified: 2016/12/15 11:50 by sgiulitti