Blue print setup on ubuntu

392 views
Skip to first unread message

Amol Kedar

unread,
Jan 27, 2012, 1:34:06 PM1/27/12
to bluepri...@googlegroups.com
so here is my scenario and please tell me if i missed out on something
i have a source server that is ubuntu 10.40 512 MB and i created a blank destination server (ubuntu 10.04 512 MB )

on source
root@load1-app:/home/akedar/blueprint/my-first-blueprint# blueprint create load1-first-blueprint
# [blueprint] using cached blueprintignore(5) rules
# [blueprint] searching for APT packages
# [blueprint] searching for configuration files
# [blueprint] searching for software built from source
# [blueprint] searching for npm packages
# [blueprint] searching for Yum packages
# [blueprint] searching for PEAR/PECL packages
PHP Deprecated:  Comments starting with '#' are deprecated in /etc/php5/cli/conf.d/imagick.ini on line 1 in Unknown on line 0
PHP Deprecated:  Comments starting with '#' are deprecated in /etc/php5/cli/conf.d/mcrypt.ini on line 1 in Unknown on line 0
# [blueprint] searching for Ruby gems
# [blueprint] searching for Python packages
# [blueprint] searching for service dependencies
root@load1-app:/home/akedar/blueprint/my-first-blueprint# blueprint push load1-first-blueprint


on destination server i see lot of error like 
ad1-first-blueprint/bootstrap.sh: 1: pear: not found
+ pear install PEAR-1.9.0
load1-first-blueprint/bootstrap.sh: 1: pear: not found
and so on...

so my questions are
  1. does it need any specific setting to include php packages and extensions in the source blueprint?
  2. how do i migrate the user settings too?
  3. and the retain the sshd configurations?


Amol Kedar

unread,
Jan 27, 2012, 8:19:24 PM1/27/12
to bluepri...@googlegroups.com
after further debugging it looks like the issue is when the print is created on the source server it takes the version into consideration
example
apt-get -y -q -o DPkg::Options::=--force-confold install php5-dev=5.3.2-1ubuntu4.5

but on the new server, since now the repository is updated it cannot fine this file instead 
the repository has this package 5.3.2-1ubuntu4.11

so how can one avoid such scenario?

Richard Crowley

unread,
Jan 28, 2012, 1:46:09 AM1/28/12
to bluepri...@googlegroups.com
On Fri, Jan 27, 2012 at 5:19 PM, Amol Kedar <ajk...@gmail.com> wrote:
> after further debugging it looks like the issue is when the print is created
> on the source server it takes the version into consideration
> example
> apt-get -y -q -o DPkg::Options::=--force-confold install
> php5-dev=5.3.2-1ubuntu4.5
>
> but on the new server, since now the repository is updated it cannot fine
> this file instead
> the repository has this package 5.3.2-1ubuntu4.11
>
> so how can one avoid such scenario?
>

The --relaxed option to blueprint-create(1) and blueprint-show(1) will
relax version constraints on all packages and instead install whatever
the latest version is. For example, rather than

apt-get -y -q -o DPkg::Options::=--force-confold install
php5-dev=5.3.2-1ubuntu4.5

it will generate

apt-get -y -q -o DPkg::Options::=--force-confold install php5-dev

Does that solve your problem?

Richard

Amol Kedar

unread,
Jan 30, 2012, 3:03:47 PM1/30/12
to bluepri...@googlegroups.com
HI Richard ,
So i was able to get around the php installation errors that i was getting by using the "-r" option
but now i have an issue where all the packages on the host server are not migrated to the destination server


Installed packages on host 
===========================
Package                  Version  State
Archive_Tar              1.3.3    stable
Cache_Lite               1.7.8    stable
Console_Getopt           1.2.3    stable
HTTP_OAuth               0.2.3    alpha
HTTP_Request2            2.0.0RC1 beta
Log                      1.12.5   stable
Mail                     1.2.0    stable
Net_SMTP                 1.4.4    stable
Net_Socket               1.0.10   stable
Net_URL2                 0.3.1    beta
OLE                      1.0.0RC1 beta
PEAR                     1.9.0    stable
Spreadsheet_Excel_Writer 0.9.2    beta
Structures_Graph         1.0.2    stable
XML_Parser               1.3.4    stable
XML_RPC2                 1.0.6    stable
XML_Serializer           0.20.2   beta
XML_Util                 1.2.1    stable


Installed packages on Destination
===========================
Package          Version State
Archive_Tar      1.3.8   stable
Cache_Lite       1.7.12  stable
Console_Getopt   1.3.1   stable
HTTP_Request2    2.0.0   stable
Log              1.12.7  stable
Mail             1.2.0   stable
Net_SMTP         1.6.1   stable
Net_Socket       1.0.10  stable
Net_URL2         2.0.0   stable
PEAR             1.9.4   stable
Structures_Graph 1.0.4   stable
XML_Parser       1.3.4   stable
XML_RPC2         1.1.1   stable
XML_Util         1.2.1   stable

so a few errors are 

+ pear install HTTP_OAuth
Failed to download pear/HTTP_OAuth within preferred state "stable", latest release is version 0.2.3, stability "alpha", use "channel://pear.php.net/HTTP_OAuth-0.2.3" to install
install failed

+ pear install Spreadsheet_Excel_Writer
Failed to download pear/Spreadsheet_Excel_Writer within preferred state "stable", latest release is version 0.9.3, stability "beta", use "channel://pear.php.net/Spreadsheet_Excel_Writer-0.9.3" to install
install failed

So does this mean since these are all beta/alpha versions they need to have specific version number and there is no way since i am using --relaxed
(sudo blueprint apply -r load1-first-blueprint)


and secondly....
how can i also migrate the contents of the /var/www/ directory?

Richard Crowley

unread,
Jan 31, 2012, 11:50:06 PM1/31/12
to bluepri...@googlegroups.com
> how do i migrate the user settings too?
> and the retain the sshd configurations?
>

Blueprint doesn't manage users or groups right now.
https://github.com/devstructure/blueprint/issues/12 is tracking this
issue as we figure out how to add this feature correctly.

/etc/ssh/* are eligible for inclusion in blueprints as configuration
files but, like the user itself, ~/.ssh/* aren't going to be included.

Richard Crowley

unread,
Jan 31, 2012, 11:53:23 PM1/31/12
to bluepri...@googlegroups.com

This is a pickle. Is there a PEAR configuration file where you can
instruct it to use alpha/beta channels? If so, that file can be
included in the blueprint and will be placed before packages are
installed, such that those channel settings will be taken into account
and hopefully not result in these errors.

>
> and secondly....
> how can i also migrate the contents of the /var/www/ directory?
>

Adding

!:source:/var/www

to /etc/blueprintignore or

:source:/var/www

to your blueprint-rules(5) file will tar up the contents of /var/www
and maintain it with the blueprint. Note, though, that Blueprint
probably isn't the best solution for large backups as it doesn't
compress the tarballs so their contents remain deterministic.

Amol Kedar

unread,
Feb 1, 2012, 12:05:12 AM2/1/12
to bluepri...@googlegroups.com
Adding

!:source:/var/www

to /etc/blueprintignore or

:source:/var/www

to your blueprint-rules(5) file will tar up the contents of /var/www
and maintain it with the blueprint.  Note, though, that Blueprint
probably isn't the best solution for large backups as it doesn't
compress the tarballs so their contents remain deterministic.

yes that is correct, as i understand the product better , i realise that is his not a good option for deploying contents of /var/www, i am trying to evaluate Chef for that


Is there a PEAR configuration file where you can
instruct it to use alpha/beta channels?  If so, that file can be
included in the blueprint and will be placed before packages are
installed, such that those channel settings will be taken into account
and hopefully not result in these errors.

not sure if there is such file, but i can research on that. Regarding including tht in blueprint, how can i do so? in a separate email i noted that blueprint-rules weren't working as desired for me

Richard Crowley

unread,
Feb 1, 2012, 9:59:44 AM2/1/12
to bluepri...@googlegroups.com
On Tue, Jan 31, 2012 at 9:05 PM, Amol Kedar <ajk...@gmail.com> wrote:
> Adding
>
> !:source:/var/www
>
> to /etc/blueprintignore or
>
> :source:/var/www
>
> to your blueprint-rules(5) file will tar up the contents of /var/www
> and maintain it with the blueprint.  Note, though, that Blueprint
> probably isn't the best solution for large backups as it doesn't
> compress the tarballs so their contents remain deterministic.
>
>
> yes that is correct, as i understand the product better , i realise that is
> his not a good option for deploying contents of /var/www, i am trying to
> evaluate Chef for that
>
>
> Is there a PEAR configuration file where you can
> instruct it to use alpha/beta channels?  If so, that file can be
> included in the blueprint and will be placed before packages are
> installed, such that those channel settings will be taken into account
> and hopefully not result in these errors.
>
>
> not sure if there is such file, but i can research on that. Regarding
> including tht in blueprint, how can i do so? in a separate email i noted
> that blueprint-rules weren't working as desired for me

In my reply to that mail I explained that :file:/usr/... won't work
because Blueprint only looks for configuration files in /etc. I
expect anything that can control PEAR will exist there, so it won't be
an issue.

Reply all
Reply to author
Forward
0 new messages