How to let maas' cloud-init client select internal mirror?
        Posted  
        
            by 
                Michael
            
        on Ask Ubuntu
        
        See other posts from Ask Ubuntu
        
            or by Michael
        
        
        
        Published on 2012-05-31T01:54:56Z
        Indexed on 
            2012/05/31
            4:49 UTC
        
        
        Read the original article
        Hit count: 410
        
Our maas lan can't access internet and have a internal apt-mirror site 192.168.3.6. I changed mirror set of maas server's snippets/maas_proxy file like:
d-i     mirror/country string manual
d-i     mirror/http/hostname string 192.168.3.6
d-i     mirror/http/directory string /ubuntu
d-i     mirror/http/proxy string
I deployed two maas node ok. Dashboard show the two node's state are ready. But node's cloud-init client changed the apt's sources.list like this:
## Note, this file is written by cloud-init on first boot of an instance
## modifications made here will not survive a re-bundle.
## if you wish to make changes you can:
## a.) add 'apt_preserve_sources_list: true' to /etc/cloud/cloud.cfg
##     or do the same in user-data
...
deb http://archive.ubuntu.com/ubuntu precise main
deb-src http://archive.ubuntu.com/ubuntu precise main
...
Directly use cobbler install node(without maas), the node apt's sources.list like:
...
deb http://192.168.3.6/ubuntu precise main
deb-src http://192.168.3.6/ubuntu precise main
...
My question is:
- How to set user-data in maas? So that I can set cloud-init's mirror's url to 192.168.3.6 or prevent cloud-init to change mirror's url.
 - Maas node's file /home/ubuntu/.ssh/authorized_keys is empty. Is it caused by the mirror's setup?
 
© Ask Ubuntu or respective owner