[chef] RE: Re: customizing bootstrap


Chronological Thread 
  • From: "Malli Pulla Reddy" < >
  • To: " " < >
  • Subject: [chef] RE: Re: customizing bootstrap
  • Date: Wed, 26 Nov 2014 08:20:47 -0800
  • Accept-language: en-US
  • Acceptlanguage: en-US

Hi Steven,

I made below changes in install.sh , in my local http server I'm uploaded 
chef-client rpm.

metadata_filename="$tmp_dir/metadata.txt"

case "$project" in
  "chef")
    
metadata_url="https://testing.exmaple.com/chef/metadata?v=${version}&prerelease=${prerelease}&nightlies=${nightlies}&p=${platform}&pv=${platform_version}&m=${machine}";
    ;;
  "angrychef")
    
metadata_url="https://www.opscode.com/chef/metadata-angrychef?v=${version}&prerelease=${prerelease}&nightlies=${nightlies}&p=${platform}&pv=${platform_version}&m=${machine}";
    ;;
  "server")
    
metadata_url="https://www.opscode.com/chef/metadata-server?v=${version}&prerelease=${prerelease}&nightlies=${nightlies}&p=${platform}&pv=${platform_version}&m=${machine}";
    ;;
  "chefdk")
    
metadata_url="https://www.opscode.com/chef/metadata-chefdk?v=${version}&prerelease=${prerelease}&nightlies=${nightlies}&p=${platform}&pv=${platform_version}&m=${machine}";
    ;;
  "container")
    
metadata_url="https://www.opscode.com/chef/metadata-container?v=${version}&prerelease=${prerelease}&nightlies=${nightlies}&p=${platform}&pv=${platform_version}&m=${machine}";
    ;;
    *)

-----Original Message-----
From: Steven Danna 
[mailto:
 
Sent: Wednesday, November 26, 2014 7:28 PM
To: 

Cc: Rajesh Pappu
Subject: [chef] Re: customizing bootstrap

Hi,

Can you show us your modified install.sh? The current install.sh script makes 
use of a service called "omnitruck" [0] and it appears that your script is 
still expecting that API to exist [1].  Namely, we are expecting

    
https://testing.exmaple.com/chef/metadata?v=11.16.2&prerelease=false&nightlies=false&p=el&pv=6&m=x86_64

to return something like:

    url     
https://opscode-omnibus-packages.s3.amazonaws.com/el/6/x86_64/chef-11.16.2-1.el6.x86_64.rpm
    md5     8731b6558009fc322f6469b415a759f8
    sha256  dc7bc9d6084d29ffec67664fdae455406c3e7657c4aebcbef19f5a9ba459db37

where the url is the actual location of the package to download.  To host the 
packages yourself, you can either:

1) Host the packages on your local server and then modify install.sh to 
simply point at the package and not need the omnitruck API
2) Host the packages in a local package repository and modify install.sh to 
configure your system to use that repository

You could probably also run your own omnitruck:

   https://github.com/opscode/opscode-omnitruck

but I think the other two options are much easier.

I hope this info helps debug what might be going on.

Cheers,

Steven

[0] An omnitruck delivers the omnibuses.
[1] https://docs.getchef.com/api_omnitruck.html
On Wed, Nov 26, 2014 at 10:16 AM, Malli Pulla Reddy 
< >
 wrote:
> Hi Chefs!
>
>
>
> Objective: Avoid going out to internet for downloading chef-client rpm 
> everytime I bootstrap a machine.
>
>
>
> Approach followed:
>
> 1. Copied install.sh to locally hosted http server
>
> 2. Edited chef-full.erb to point it to install.sh from my http server
>
> 3. Edited install.sh to point chef-client rpm that is on my http 
> server
>
>
>
> Result:
>
>
>
>  :~/chefser12work/chef-repo$
>  sudo knife bootstrap 
> 192.168.0.15 -sudo -x root -P wc5ack3 --distro test
>
> Connecting to 1.1.1.1
>
> 1.1.1.1 --2014-11-26 15:41:43--
> http://buildrepo.examplel.com/Adapters/chef-utils/install.sh
>
> 1.1.1.1 Resolving buildrepo.examplel.com... 2.2.2.2
>
> 1.1.1.1 Connecting to buildrepo.examplel.com|2.2.2.2|:80... connected.
>
> 1.1.1.1 HTTP request sent, awaiting response... 200 OK
>
> 1.1.1.1 Length: 16592 (16K) [application/x-sh]
>
> 1.1.1.1 Saving to: `STDOUT'
>
> 1.1.1.1
>
> 100%[======================================>] 16,592      --.-K/s   in 0.02s
>
> 1.1.1.1
>
> 1.1.1.1 2014-11-26 15:41:43 (852 KB/s) - written to stdout 
> [16592/16592]
>
> 1.1.1.1
>
> 1.1.1.1 Downloading Chef 11.16.2 for el...
>
> 1.1.1.1 downloading
> https://testing.exmaple.com/chef/metadata?v=11.16.2&prerelease=false&n
> ightlies=false&p=el&pv=6&m=x86_64
>
> 1.1.1.1   to file /tmp/install.sh.1628/metadata.txt
>
> 1.1.1.1 trying wget...
>
> 1.1.1.1 ERROR 404
>
> 1.1.1.1 Unable to retrieve a valid package!
>
> 1.1.1.1 Please file a bug report at
> https://github.com/opscode/opscode-omnitruck/issues/new
>
> 1.1.1.1 Version: 11.16.2
>
> 1.1.1.1
>
> 1.1.1.1 Please detail your operating system type, version and any 
> other relevant details
>
> 1.1.1.1 Metadata URL:
> https://testing.exmaple.com/chef/metadata?v=11.16.2&prerelease=false&n
> ightlies=false&p=el&pv=6&m=x86_64
>
> 1.1.1.1 bash: line 89: chef-client: command not found
>
>
>
> Regards,
>
> PullaReddy
>
> TechOps
>
>



Archive powered by MHonArc 2.6.16.

§