Hey Andrija and μ‘°λŒ€ν˜•,

        Here is a script a threw 
https://github.com/dredknight/cloud_scripts/blob/master/CloudStack-Xen/centos7_prep.bash
        It implements the following features:
        - some OS prep + install some packets
        - install cloud-init related packets
        
        Cloud-init features:
        - datasources -  sets as ConfigDrive and CloudStack as default 
datasources
        - password + reset      
                - makes password module run on every boot instead of once per 
instance - - cloud.cfg
                - assigns user with name cloud-user to be integrated with 
Cloudstack (initial password set + reset) - 80_root.cfg
        - autoextend root partition (only) upon resize from Cloudstack GUI
                - uses growpart to rewrite MBR tables - 50_growpartion.cfg
                - adds additional commands to extend PVS, VGS and LVS after 
that - 51_extend_volume.cfg

Script is in a bit of raw shape but it works.
Currently I am doing similar script for Ubuntu. 

Thanks for the heads up Andrija, I have to do a documentation for the team 
anyway so I better contribute to what is already existing instead of doing it 
from scratch 😊.

Btw if anyone has some tips on the cloud-init feature for the SSH keys I would 
like to add that too to the bundle.

Best regards,
Jordan
        

-----Original Message-----
From: μ‘°λŒ€ν˜• <carl...@renet.kr> 
Sent: Friday, May 14, 2021 7:14 AM
To: users@cloudstack.apache.org
Subject: RE: Centos 7.9 - cloud-init password reset?


[X] This message came from outside your organization


Hi, Jordan.

I am the one who is testing the same solution and need a solution.
Can you share the knowledge?

Thanks in advance.

Thanks,


-----Original Message-----
From: Andrija Panic [mailto:andrija.pa...@gmail.com]
Sent: Friday, May 14, 2021 7:24 AM
To: users
Subject: Re: Centos 7.9 - cloud-init password reset?

Would it be nice if you could update the ACS documentation on the 
password-reset script, to very briefly explain how the same can be achieved 
with cloud-init, and what to look-for (i.e. issues you had etc)

This would help the product and other users which might have the same issue.

Thanks,

On Thu, 13 May 2021 at 11:27, Yordan Kostov <yord...@nsogroup.com> wrote:

> Thank you Alireza!
>
>         I tested it and it is working!
>
> Best regards,
> Jordan
>
> -----Original Message-----
> From: Yordan Kostov <yord...@nsogroup.com>
> Sent: Wednesday, May 12, 2021 1:17 PM
> To: users@cloudstack.apache.org
> Subject: RE: Centos 7.9 - cloud-init password reset?
>
>
> [X] This message came from outside your organization
>
>
> Thank you Alireza,
>
>         I am currently reconfiguring the template from scratch and 
> will test!
>
> Best regards,
> Jordan
>
> -----Original Message-----
> From: Alireza Eskandari <astro.alir...@gmail.com>
> Sent: Tuesday, May 11, 2021 5:09 PM
> To: users@cloudstack.apache.org
> Subject: Re: Centos 7.9 - cloud-init password reset?
>
>
> [X] This message came from outside your organization
>
>
> Hi
> You should check log files in /run/cloud-init directory for the root cause.
> If cloud-init cannot find the datasource, it won't run.
> The better way to configure datasource in cloud-init is using 
> ds-identify.cfg file Delete "/etc/cloud/cloud.cfg.d/99_cloudstack.cfg" 
> and create "/etc/cloud/ds-identify.cfg" file with this content:
> datasource: ConfigDrive, CloudStack
> Then check output of this command:
> DEBUG_LEVEL=2 DI_LOG=stderr /usr/lib/cloud-init/ds-identify --force 
> Unfortunately cloud-init is poorly documented and you should do some 
> try and error to fix it.
> Take a look at this link:
>
> https://urldefense.com/v3/__https://cloudinit.readthedocs.io/en/latest
> /topics/faq.html__;!!A6UyJA!2vfkFVGQOoMM0mDg1l-3C6bstn_Yp1e6L5bcnqYmIw
> w2wWMz3EgdTU6-DlC5Z-6zLeBde_X0gZxc$
>
> On Tue, May 11, 2021 at 7:52 AM Yordan Kostov <yord...@nsogroup.com>
> wrote:
>
> > Hey everyone,
> >
> >                 I try to use cloud-init for password reset but for 
> > some reason it does not work. I thought it is out of the box ☹. Here 
> > is my
> > config:
> >
> > == Centos 7.9  minimal
> >
> > yum -y install cloud-init cloud-utils-growpart systemctl enable 
> > cloud-init
> >
> > echo "datasource:
> > CloudStack: {}
> > None: {}
> > datasource_list:
> > CloudStack" > /etc/cloud/cloud.cfg.d/99_cloudstack.cfg
> >
> >
> > echo "system_info:
> >     default_user:
> >      name: root
> > disable_root: 0
> > ssh_pwauth: 1" > /etc/cloud/cloud.cfg.d/80_root.cfg
> >
> > First and foremost cloud-init does not run at all. There is noting 
> > in the logs /var/logs/cloud-init.log When launched manual via 
> > cloud-init init, logs say it is all successful but root password is not 
> > changed.
> >
> > Not sure If I do something wrong but everyplace I do read says it 
> > should be working without pretty much complications.
> > Do I do something wrong?
> >
> > Regards,
> > Jordan
> >
>


--

Andrija Panić

Reply via email to