Changing userdata in MAAS for customizing the enlisting, commissioning and deploying

sachidananda sahu sachi059 at gmail.com
Tue Jun 20 08:42:32 UTC 2017


On Tue, Jun 20, 2017 at 2:12 PM, sachidananda sahu <sachi059 at gmail.com>
wrote:

> Hello Andres,
> Any update on this ?
>
> In Maas 1.9 GUI even there is no place to add GPG keys, and how can we
> give the gpg key and tell the compute to use this to add as apt-key ?
>
> Which file i need to edit for this for enlisting phase,  i can see
> curtin_userdata file updating the gpg key , i guess this file is used in
> deploy phase user data,
>
> early_commands:
>   {{py: key_string = ''.join(['\\x%x' % x for x in map(ord,
> driver['key_binary'])])}}
>  * driver_00_get_key: /bin/echo -en '{{key_string}}' >
> /tmp/maas-{{driver['package']}}.gpg*
> *  driver_01_add_key: ["apt-key", "add",
> "/tmp/maas-{{driver['package']}}.gpg"]*
>   driver_02_add: ["add-apt-repository", "-y", "deb
> {{driver['repository']}} {{node.get_distro_series()}} main"]
>
> Which file i can change to add jpg key during enlisting and commisioning
> phase, as i am getting error following packages can not be authenticated
> after pointing to local repo.
>
> So can you guide me to change the file to tell compute to use this apt
> repo key ?
>
> On Mon, Jun 19, 2017 at 5:34 PM, sachidananda sahu <sachi059 at gmail.com>
> wrote:
>
>> Hello Andres,
>> Thanks a lot for informing about the GUI option available to change the
>> repo. I am able to change the local repo setting, and node was able to
>> enlist and commission and able to use local repo, but what can i see is
>> apt-get update was failing as maas gives a sources.list for all compute
>> provisioned through maas, and our local mirror did not had the complete
>> sources. (like security , multiverse and all ). Due to this Deploy was
>> failing after curtin install log, but it was not able to run curtin script.
>>
>>
>>  It was failing by showing an error i attached as image.[image: Inline
>> image 1]
>>
>> And in Gui log it stopped like and failed deployment. [image: Inline
>> image 2]
>>
>>
>> So is it possible to change the default sources.list which is used by
>> maas to deploy a node so that compute can use customized sources.list
>> during enlist, commission and deploy.
>>
>>
>> On Fri, Jun 16, 2017 at 9:06 PM, sachidananda sahu <sachi059 at gmail.com>
>> wrote:
>>
>>> Hello Andres, i have changed local repo path in the the way you
>>> suggested and Commissioning phase was successful, but deploying phases it
>>> strucks.
>>>
>>> Log is Installing curtin and getting boot image after that it is not
>>> proceeding for anything.
>>>
>>> On Fri, Jun 16, 2017 at 8:16 PM, sachidananda sahu <sachi059 at gmail.com>
>>> wrote:
>>>
>>>> Hello Andres,
>>>> Even i am able to find the setting to change package repositories from
>>>> the default archives to local mirrors (or different mirrors). in Maas 1.9
>>>>
>>>> Let me try this by changing and will update you further.
>>>>
>>>> Thanks a lot for the help.
>>>>
>>>> On Fri, Jun 16, 2017 at 8:13 PM, sachidananda sahu <sachi059 at gmail.com>
>>>> wrote:
>>>>
>>>>> Hi Andres,
>>>>> Thanks for quick reply, really appreciate it :-)
>>>>>
>>>>> Need couple of clarification from you,
>>>>> 1> If i change the repo by this process does maas will always use the
>>>>> configured repo for all phase (enlisting, commissioning , deploying) phase
>>>>>
>>>>> 2> But unfortunately i am using maas 1.9, will this similar
>>>>> option/feature exist where i can change the apt mirror to point different
>>>>> location.
>>>>> 3> As MAAS 1.9 i am able to change the apt sources for enlisting by
>>>>> changing the userdata, is it possible to similar for other phases ?
>>>>>
>>>>> Thanks,
>>>>>
>>>>> On Fri, Jun 16, 2017 at 7:57 PM, Andres Rodriguez <
>>>>> andres.rodriguez at canonical.com> wrote:
>>>>>
>>>>>> Hi Sachidananda!
>>>>>>
>>>>>> You do not need to modify preseeds to select which repositories you
>>>>>> want to use.
>>>>>>
>>>>>> Please refer to [1] to learn how to change package repositories from
>>>>>> the default archives to local mirrors (or different mirrors).
>>>>>>
>>>>>> [1]: https://docs.ubuntu.com/maas/2.1/en/manage-repos
>>>>>>
>>>>>> On Fri, Jun 16, 2017 at 3:17 PM, sachidananda sahu <
>>>>>> sachi059 at gmail.com> wrote:
>>>>>>
>>>>>>> Hello All,
>>>>>>>
>>>>>>> With little info and research, i was able to edit the enlisting user
>>>>>>> data in the file */etc/maas/preseeds/enlist_userdata* and it is
>>>>>>> working fine, Basically just for testing i edited a single parameter
>>>>>>> *apt_mirror.*
>>>>>>>
>>>>>>> Similarly i want to change the user data for commissioning and
>>>>>>> deploying user data. I am not able to see any file for commissioning phase,
>>>>>>> i can see just a simple file *commissioning  * whose content is just* {{preseed_data}}
>>>>>>> *, So i need little help to understand how MAAS takes the enlisting
>>>>>>> userdata for cloud init.
>>>>>>>
>>>>>>> Even i am interested to play around with deploy phase by changing
>>>>>>> its userdata, as for deploy it uses curtin as per maas documentation so i
>>>>>>> changed in curtin_userdata but it is not taking any effect, i am deploying
>>>>>>> ubuntu 14.04 image for node.
>>>>>>>
>>>>>>>
>>>>>>> Any help or reference will help me to dig more to understand more
>>>>>>> about maas.
>>>>>>>
>>>>>>> --
>>>>>>> Regards,
>>>>>>> Sachidananda Sahu
>>>>>>> +91-9035265767 <+91%2090352%2065767>
>>>>>>>
>>>>>>> --
>>>>>>> Maas-devel mailing list
>>>>>>> Maas-devel at lists.ubuntu.com
>>>>>>> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailm
>>>>>>> an/listinfo/maas-devel
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Andres Rodriguez
>>>>>> Engineering Manager, MAAS
>>>>>> Canonical USA, Inc.
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Regards,
>>>>> Sachidananda Sahu
>>>>> +91-9035265767 <+91%2090352%2065767>
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Regards,
>>>> Sachidananda Sahu
>>>> +91-9035265767 <+91%2090352%2065767>
>>>>
>>>
>>>
>>>
>>> --
>>> Regards,
>>> Sachidananda Sahu
>>> +91-9035265767 <+91%2090352%2065767>
>>>
>>
>>
>>
>> --
>> Regards,
>> Sachidananda Sahu
>> +91-9035265767 <+91%2090352%2065767>
>>
>
>
>
> --
> Regards,
> Sachidananda Sahu
> +91-9035265767 <+91%2090352%2065767>
>



-- 
Regards,
Sachidananda Sahu
+91-9035265767
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/maas-devel/attachments/20170620/5a01cd05/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: errorcmd.JPG
Type: image/jpeg
Size: 69962 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/maas-devel/attachments/20170620/5a01cd05/attachment-0002.jpe>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: maasguilog.JPG
Type: image/jpeg
Size: 84785 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/maas-devel/attachments/20170620/5a01cd05/attachment-0003.jpe>


More information about the Maas-devel mailing list