You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cloudstack.apache.org by Shanker Balan <sh...@shapeblue.com> on 2013/10/01 08:51:26 UTC

Re: cloud-set-guest-password script for ArchLinux?

On 27-Sep-2013, at 12:22 PM, Kirk Kosinski <ki...@gmail.com> wrote:

> Hi, did you try any of the existing scripts?  One or more of them will
> probably work as-is or with minor modifications.  The primary
> requirement is to use a compatible DHCP client like the ISC DHCP client
> (dhclient).

Hi Indra,

I took ArchLinux for a spin earlier today and noticed that the default DHCP client is "dhcpcd" which maintains the lease file in a binary format.

Our choices:

1) See if we can move from dhcpcd to ISC DHCP or
2) Dump the lease file contents and update the cloud-set-guest-password script.

Arch Linux uses systemd instead of the traditional sysinit. The script will need
an overhaul to support systemd also.

[root@ARCH1 var]# cat /var/lib/dhcpcd/dhcpcd-eth0.lease
@=>?
?
kc?Sc56
3???????
?
 ARCH1

[root@ARCH1 var]# pacman -Qi dhcpcd
Name           : dhcpcd
Version        : 6.0.5-1
Description    : RFC2131 compliant DHCP client daemon
Architecture   : x86_64
URL            : http://roy.marples.name/projects/dhcpcd/
Licenses       : BSD
Groups         : base
Provides       : dhcp-client
Depends On     : glibc  sh
Optional Deps  : None
Required By    : None
Optional For   : netctl
Conflicts With : None
Replaces       : None
Installed Size : 285.00 KiB
Packager       : Dave Reisner <dr...@archlinux.org>
Build Date     : Sat Aug 3 20:50:18 2013
Install Date   : Tue Oct 1 10:25:13 2013
Install Reason : Explicitly installed
Install Script : No
Validated By   : Signature



>
> Best regards,
> Kirk
>
>
> On 09/26/2013 11:06 PM, Indra Pramana wrote:
>> Dear all,
>>
>> I am trying to create CloudStack OS template for ArchLinux. However, I am
>> not able to find the cloud-set-guest-password password management template
>> script for ArchLinux. Under the shankerbalan's github site, there are only
>> scripts for CentOS, Ubuntu, Debian, FreeBSD and SLES:
>>
>> https://github.com/shankerbalan/cloudstack-scripts
>>
>> Where can I get the password management template script for ArchLinux?
>>
>> Looking forward to your reply, thank you.
>>
>> Cheers.
>>

--
@shankerbalan

M: +91 98860 60539 | O: +91 (80) 67935867
shanker.balan@shapeblue.com | www.shapeblue.com | Twitter:@shapeblue
ShapeBlue Services India LLP, 22nd floor, Unit 2201A, World Trade Centre, Bangalore - 560 055

CloudStack Bootcamp Training on 18/19 September, Bangalore
http://www.shapeblue.com/cloudstack-training/



This email and any attachments to it may be confidential and are intended solely for the use of the individual to whom it is addressed. Any views or opinions expressed are solely those of the author and do not necessarily represent those of Shape Blue Ltd or related companies. If you are not the intended recipient of this email, you must neither take any action based upon its contents, nor copy or show it to anyone. Please contact the sender if you believe you have received this email in error. Shape Blue Ltd is a company incorporated in England & Wales. ShapeBlue Services India LLP is a company incorporated in India and is operated under license from Shape Blue Ltd. Shape Blue Brasil Consultoria Ltda is a company incorporated in Brasil and is operated under license from Shape Blue Ltd. ShapeBlue is a registered trademark.

Re: cloud-set-guest-password script for ArchLinux?

Posted by Shanker Balan <sh...@shapeblue.com>.
On 01-Oct-2013, at 7:33 PM, Shanker Balan <sh...@shapeblue.com> wrote:

> On 01-Oct-2013, at 1:42 PM, Kirk Kosinski <ki...@gmail.com> wrote:
>
>> For dhcpcd, update the script to use the following instead of checking
>> lease files:
>>
>> PASSWORD_SERVER_IP=$(dhcpcd -U eth0 | grep dhcp_server_identifier | cut
>> -f2 -d=)
>
>
> Sweet. Thanks for the hint, saved me tons of R&D time. :)
>
> I'll publish cloud-set-guest-* scripts for Arch Linux shortly.
>


I have published the Arch Linux specific cloudstack-set-guest-password
and cloudstack-set-guest-sshkey scripts on GitHub.

https://github.com/shankerbalan/cloudstack-scripts/tree/master/archlinux
http://shankerbalan.net/blog/cloudstack-guest-set-password-script-for-arch-linux/


--
@shankerbalan

M: +91 98860 60539 | O: +91 (80) 67935867
shanker.balan@shapeblue.com | www.shapeblue.com | Twitter:@shapeblue
ShapeBlue Services India LLP, 22nd floor, Unit 2201A, World Trade Centre, Bangalore - 560 055
This email and any attachments to it may be confidential and are intended solely for the use of the individual to whom it is addressed. Any views or opinions expressed are solely those of the author and do not necessarily represent those of Shape Blue Ltd or related companies. If you are not the intended recipient of this email, you must neither take any action based upon its contents, nor copy or show it to anyone. Please contact the sender if you believe you have received this email in error. Shape Blue Ltd is a company incorporated in England & Wales. ShapeBlue Services India LLP is a company incorporated in India and is operated under license from Shape Blue Ltd. Shape Blue Brasil Consultoria Ltda is a company incorporated in Brasil and is operated under license from Shape Blue Ltd. ShapeBlue is a registered trademark.

Re: cloud-set-guest-password script for ArchLinux?

Posted by Shanker Balan <sh...@shapeblue.com>.
On 01-Oct-2013, at 1:42 PM, Kirk Kosinski <ki...@gmail.com> wrote:

> For dhcpcd, update the script to use the following instead of checking
> lease files:
>
> PASSWORD_SERVER_IP=$(dhcpcd -U eth0 | grep dhcp_server_identifier | cut
> -f2 -d=)


Sweet. Thanks for the hint, saved me tons of R&D time. :)

I'll publish cloud-set-guest-* scripts for Arch Linux shortly.


>
> This is similar to the change required to use pump.
>
> PASSWORD_SERVER_IP=$(pump --status | grep 'Boot server' | awk '{print $3}')
>
> dhcpcd is also the default(-ish) DHCP client for Gentoo.  pump used to
> be the default for Ubuntu and in some cases works better than the
> default dhclient.

Its amazing how many different DHCP clients exists out there. :-\

Thanks.
@shankerbalan


>
> Best regards,
> Kirk
>
> On 09/30/2013 11:51 PM, Shanker Balan wrote:
>> On 27-Sep-2013, at 12:22 PM, Kirk Kosinski <ki...@gmail.com> wrote:
>>
>>> Hi, did you try any of the existing scripts?  One or more of them will
>>> probably work as-is or with minor modifications.  The primary
>>> requirement is to use a compatible DHCP client like the ISC DHCP client
>>> (dhclient).
>>
>> Hi Indra,
>>
>> I took ArchLinux for a spin earlier today and noticed that the default DHCP client is "dhcpcd" which maintains the lease file in a binary format.
>>
>> Our choices:
>>
>> 1) See if we can move from dhcpcd to ISC DHCP or
>> 2) Dump the lease file contents and update the cloud-set-guest-password script.
>>
>> Arch Linux uses systemd instead of the traditional sysinit. The script will need
>> an overhaul to support systemd also.
>>
>> [root@ARCH1 var]# cat /var/lib/dhcpcd/dhcpcd-eth0.lease
>> @=>?
>> ?
>> kc?Sc56
>> 3???????
>> ?
>> ARCH1
>>
>> [root@ARCH1 var]# pacman -Qi dhcpcd
>> Name           : dhcpcd
>> Version        : 6.0.5-1
>> Description    : RFC2131 compliant DHCP client daemon
>> Architecture   : x86_64
>> URL            : http://roy.marples.name/projects/dhcpcd/
>> Licenses       : BSD
>> Groups         : base
>> Provides       : dhcp-client
>> Depends On     : glibc  sh
>> Optional Deps  : None
>> Required By    : None
>> Optional For   : netctl
>> Conflicts With : None
>> Replaces       : None
>> Installed Size : 285.00 KiB
>> Packager       : Dave Reisner <dr...@archlinux.org>
>> Build Date     : Sat Aug 3 20:50:18 2013
>> Install Date   : Tue Oct 1 10:25:13 2013
>> Install Reason : Explicitly installed
>> Install Script : No
>> Validated By   : Signature
>>
>>
>>
>>>
>>> Best regards,
>>> Kirk
>>>
>>>
>>> On 09/26/2013 11:06 PM, Indra Pramana wrote:
>>>> Dear all,
>>>>
>>>> I am trying to create CloudStack OS template for ArchLinux. However, I am
>>>> not able to find the cloud-set-guest-password password management template
>>>> script for ArchLinux. Under the shankerbalan's github site, there are only
>>>> scripts for CentOS, Ubuntu, Debian, FreeBSD and SLES:
>>>>
>>>> https://github.com/shankerbalan/cloudstack-scripts
>>>>
>>>> Where can I get the password management template script for ArchLinux?
>>>>
>>>> Looking forward to your reply, thank you.
>>>>
>>>> Cheers.
>>>>
>>
>> --
>> @shankerbalan
>>
>> M: +91 98860 60539 | O: +91 (80) 67935867
>> shanker.balan@shapeblue.com | www.shapeblue.com | Twitter:@shapeblue
>> ShapeBlue Services India LLP, 22nd floor, Unit 2201A, World Trade Centre, Bangalore - 560 055
>>
>> CloudStack Bootcamp Training on 18/19 September, Bangalore
>> http://www.shapeblue.com/cloudstack-training/
>>
>>
>>
>> This email and any attachments to it may be confidential and are intended solely for the use of the individual to whom it is addressed. Any views or opinions expressed are solely those of the author and do not necessarily represent those of Shape Blue Ltd or related companies. If you are not the intended recipient of this email, you must neither take any action based upon its contents, nor copy or show it to anyone. Please contact the sender if you believe you have received this email in error. Shape Blue Ltd is a company incorporated in England & Wales. ShapeBlue Services India LLP is a company incorporated in India and is operated under license from Shape Blue Ltd. Shape Blue Brasil Consultoria Ltda is a company incorporated in Brasil and is operated under license from Shape Blue Ltd. ShapeBlue is a registered trademark.
>>

--
@shankerbalan

M: +91 98860 60539 | O: +91 (80) 67935867
shanker.balan@shapeblue.com | www.shapeblue.com | Twitter:@shapeblue
ShapeBlue Services India LLP, 22nd floor, Unit 2201A, World Trade Centre, Bangalore - 560 055

CloudStack Bootcamp Training on 18/19 September, Bangalore
http://www.shapeblue.com/cloudstack-training/



This email and any attachments to it may be confidential and are intended solely for the use of the individual to whom it is addressed. Any views or opinions expressed are solely those of the author and do not necessarily represent those of Shape Blue Ltd or related companies. If you are not the intended recipient of this email, you must neither take any action based upon its contents, nor copy or show it to anyone. Please contact the sender if you believe you have received this email in error. Shape Blue Ltd is a company incorporated in England & Wales. ShapeBlue Services India LLP is a company incorporated in India and is operated under license from Shape Blue Ltd. Shape Blue Brasil Consultoria Ltda is a company incorporated in Brasil and is operated under license from Shape Blue Ltd. ShapeBlue is a registered trademark.

Re: cloud-set-guest-password script for ArchLinux?

Posted by Kirk Kosinski <ki...@gmail.com>.
For dhcpcd, update the script to use the following instead of checking
lease files:

PASSWORD_SERVER_IP=$(dhcpcd -U eth0 | grep dhcp_server_identifier | cut
-f2 -d=)

This is similar to the change required to use pump.

PASSWORD_SERVER_IP=$(pump --status | grep 'Boot server' | awk '{print $3}')

dhcpcd is also the default(-ish) DHCP client for Gentoo.  pump used to
be the default for Ubuntu and in some cases works better than the
default dhclient.

Best regards,
Kirk

On 09/30/2013 11:51 PM, Shanker Balan wrote:
> On 27-Sep-2013, at 12:22 PM, Kirk Kosinski <ki...@gmail.com> wrote:
> 
>> Hi, did you try any of the existing scripts?  One or more of them will
>> probably work as-is or with minor modifications.  The primary
>> requirement is to use a compatible DHCP client like the ISC DHCP client
>> (dhclient).
> 
> Hi Indra,
> 
> I took ArchLinux for a spin earlier today and noticed that the default DHCP client is "dhcpcd" which maintains the lease file in a binary format.
> 
> Our choices:
> 
> 1) See if we can move from dhcpcd to ISC DHCP or
> 2) Dump the lease file contents and update the cloud-set-guest-password script.
> 
> Arch Linux uses systemd instead of the traditional sysinit. The script will need
> an overhaul to support systemd also.
> 
> [root@ARCH1 var]# cat /var/lib/dhcpcd/dhcpcd-eth0.lease
> @=>?
> ?
> kc?Sc56
> 3???????
> ?
>  ARCH1
> 
> [root@ARCH1 var]# pacman -Qi dhcpcd
> Name           : dhcpcd
> Version        : 6.0.5-1
> Description    : RFC2131 compliant DHCP client daemon
> Architecture   : x86_64
> URL            : http://roy.marples.name/projects/dhcpcd/
> Licenses       : BSD
> Groups         : base
> Provides       : dhcp-client
> Depends On     : glibc  sh
> Optional Deps  : None
> Required By    : None
> Optional For   : netctl
> Conflicts With : None
> Replaces       : None
> Installed Size : 285.00 KiB
> Packager       : Dave Reisner <dr...@archlinux.org>
> Build Date     : Sat Aug 3 20:50:18 2013
> Install Date   : Tue Oct 1 10:25:13 2013
> Install Reason : Explicitly installed
> Install Script : No
> Validated By   : Signature
> 
> 
> 
>>
>> Best regards,
>> Kirk
>>
>>
>> On 09/26/2013 11:06 PM, Indra Pramana wrote:
>>> Dear all,
>>>
>>> I am trying to create CloudStack OS template for ArchLinux. However, I am
>>> not able to find the cloud-set-guest-password password management template
>>> script for ArchLinux. Under the shankerbalan's github site, there are only
>>> scripts for CentOS, Ubuntu, Debian, FreeBSD and SLES:
>>>
>>> https://github.com/shankerbalan/cloudstack-scripts
>>>
>>> Where can I get the password management template script for ArchLinux?
>>>
>>> Looking forward to your reply, thank you.
>>>
>>> Cheers.
>>>
> 
> --
> @shankerbalan
> 
> M: +91 98860 60539 | O: +91 (80) 67935867
> shanker.balan@shapeblue.com | www.shapeblue.com | Twitter:@shapeblue
> ShapeBlue Services India LLP, 22nd floor, Unit 2201A, World Trade Centre, Bangalore - 560 055
> 
> CloudStack Bootcamp Training on 18/19 September, Bangalore
> http://www.shapeblue.com/cloudstack-training/
> 
> 
> 
> This email and any attachments to it may be confidential and are intended solely for the use of the individual to whom it is addressed. Any views or opinions expressed are solely those of the author and do not necessarily represent those of Shape Blue Ltd or related companies. If you are not the intended recipient of this email, you must neither take any action based upon its contents, nor copy or show it to anyone. Please contact the sender if you believe you have received this email in error. Shape Blue Ltd is a company incorporated in England & Wales. ShapeBlue Services India LLP is a company incorporated in India and is operated under license from Shape Blue Ltd. Shape Blue Brasil Consultoria Ltda is a company incorporated in Brasil and is operated under license from Shape Blue Ltd. ShapeBlue is a registered trademark.
> 

Re: cloud-set-guest-password script for ArchLinux?

Posted by Indra Pramana <in...@sg.or.id>.
Hi Shankerbalan and all,

I managed to workaround that by installing NetworkManager (which comes with
dhclient by default) and disabling dhcpcd.

Also need to modify the script so that it will try to search the .lease
file on /var/lib/NetworkManager/* directory instead.

Other than that, the script works nicely with systemd without any issues.

Thank you.




On Tue, Oct 1, 2013 at 2:51 PM, Shanker Balan
<sh...@shapeblue.com>wrote:

> On 27-Sep-2013, at 12:22 PM, Kirk Kosinski <ki...@gmail.com> wrote:
>
> > Hi, did you try any of the existing scripts?  One or more of them will
> > probably work as-is or with minor modifications.  The primary
> > requirement is to use a compatible DHCP client like the ISC DHCP client
> > (dhclient).
>
> Hi Indra,
>
> I took ArchLinux for a spin earlier today and noticed that the default
> DHCP client is "dhcpcd" which maintains the lease file in a binary format.
>
> Our choices:
>
> 1) See if we can move from dhcpcd to ISC DHCP or
> 2) Dump the lease file contents and update the cloud-set-guest-password
> script.
>
> Arch Linux uses systemd instead of the traditional sysinit. The script
> will need
> an overhaul to support systemd also.
>
> [root@ARCH1 var]# cat /var/lib/dhcpcd/dhcpcd-eth0.lease
> @=>?
> ?
> kc?Sc56
> 3???????
> ?
>  ARCH1
>
> [root@ARCH1 var]# pacman -Qi dhcpcd
> Name           : dhcpcd
> Version        : 6.0.5-1
> Description    : RFC2131 compliant DHCP client daemon
> Architecture   : x86_64
> URL            : http://roy.marples.name/projects/dhcpcd/
> Licenses       : BSD
> Groups         : base
> Provides       : dhcp-client
> Depends On     : glibc  sh
> Optional Deps  : None
> Required By    : None
> Optional For   : netctl
> Conflicts With : None
> Replaces       : None
> Installed Size : 285.00 KiB
> Packager       : Dave Reisner <dr...@archlinux.org>
> Build Date     : Sat Aug 3 20:50:18 2013
> Install Date   : Tue Oct 1 10:25:13 2013
> Install Reason : Explicitly installed
> Install Script : No
> Validated By   : Signature
>
>
>
> >
> > Best regards,
> > Kirk
> >
> >
> > On 09/26/2013 11:06 PM, Indra Pramana wrote:
> >> Dear all,
> >>
> >> I am trying to create CloudStack OS template for ArchLinux. However, I
> am
> >> not able to find the cloud-set-guest-password password management
> template
> >> script for ArchLinux. Under the shankerbalan's github site, there are
> only
> >> scripts for CentOS, Ubuntu, Debian, FreeBSD and SLES:
> >>
> >> https://github.com/shankerbalan/cloudstack-scripts
> >>
> >> Where can I get the password management template script for ArchLinux?
> >>
> >> Looking forward to your reply, thank you.
> >>
> >> Cheers.
> >>
>
> --
> @shankerbalan
>
> M: +91 98860 60539 | O: +91 (80) 67935867
> shanker.balan@shapeblue.com | www.shapeblue.com | Twitter:@shapeblue
> ShapeBlue Services India LLP, 22nd floor, Unit 2201A, World Trade Centre,
> Bangalore - 560 055
>
> CloudStack Bootcamp Training on 18/19 September, Bangalore
> http://www.shapeblue.com/cloudstack-training/
>
>
>
> This email and any attachments to it may be confidential and are intended
> solely for the use of the individual to whom it is addressed. Any views or
> opinions expressed are solely those of the author and do not necessarily
> represent those of Shape Blue Ltd or related companies. If you are not the
> intended recipient of this email, you must neither take any action based
> upon its contents, nor copy or show it to anyone. Please contact the sender
> if you believe you have received this email in error. Shape Blue Ltd is a
> company incorporated in England & Wales. ShapeBlue Services India LLP is a
> company incorporated in India and is operated under license from Shape Blue
> Ltd. Shape Blue Brasil Consultoria Ltda is a company incorporated in Brasil
> and is operated under license from Shape Blue Ltd. ShapeBlue is a
> registered trademark.
>