Chef server 11 packages for ubuntu


#1

Folks,

I created the following script to automatically download latest chef
server 11 ubuntu packages and add them to local repository:

#!/bin/bash
set -u -e
exec >> $0.log 2>&1

PLATFORM=ubuntu
PLATFORM_VERSION=12.04
ARCHITECTURE=x86_64
MAX_LOG_SIZE=1000000

PKG_URL="http://www.opscode.com/chef/download-server?p={PLATFORM}&pv={PLATFORM_VERSION}&m=${ARCHITECTURE}&v=latest&prerelease=true&nightlies=true"
LOCATION_FILE=$HOME/chef-server-location

old_location=$(cat LOCATION_FILE) new_location=(curl -sIL “$PKG_URL”|grep ^Location)
[ “$old_location” == "new_location" ] && exit echo "(date) started"
wget -nv --content-disposition “$PKG_URL"
mv chef-server_11*.deb /var/www/deb-box/incoming/precise/testing
echo “$new_location” >LOCATION_FILE echo "(date) completed”
(($(stat -c %s $0.log) > $MAX_LOG_SIZE)) && mv $0.log $0.log.old

During last 3 days this script downloaded the following files:

chef-server_11.0.0-alpha.3+20130130075202.git.38.3332a80-1.ubuntu.11.04_amd64.deb
chef-server_11.0.0-alpha.3+20130128075214.git.37.d143b92-1.ubuntu.12.04_amd64.deb
chef-server_11.0.0-alpha.3+20130129075201.git.38.3332a80-1.ubuntu.11.04_amd64.deb
chef-server_11.0.0-alpha.3+20130129051708.git.38.3332a80-1.ubuntu.12.04_amd64.deb

Do I understand correctly that 11.04 in the name corresponds to ubuntu
version this package is intended for? If yes looks like setting pv
parameter doesn’t work as expected. May I ask somebody aware of details
clarify this?

Thanks,
Kirill.


#2

On Wed, Jan 30, 2013 at 2:51 PM, Kirill Timofeev kvt@hulu.com wrote:

Do I understand correctly that 11.04 in the name corresponds to ubuntu
version this package is intended for? If yes looks like setting pv parameter
doesn’t work as expected. May I ask somebody aware of details clarify this?

11.04 is what it was built on. When possible, our build system uses a
single build from one system, then runs it through tests on multiple
other platforms/versions before release. You can see these
relationships here:

https://github.com/opscode/omnibus-chef/blob/master/jenkins/chef.json#L131

That section shows that we use an Ubuntu 11.04 x64 system as a build
system for Ubuntu 11.04, 11.10, 12.04 & 12.10 x64 systems.

Bryan


#3

Thanks a lot for clarification Bryan!

On 01/30/2013 04:42 PM, Bryan McLellan wrote:

On Wed, Jan 30, 2013 at 2:51 PM, Kirill Timofeev kvt@hulu.com wrote:

Do I understand correctly that 11.04 in the name corresponds to ubuntu
version this package is intended for? If yes looks like setting pv parameter
doesn’t work as expected. May I ask somebody aware of details clarify this?
11.04 is what it was built on. When possible, our build system uses a
single build from one system, then runs it through tests on multiple
other platforms/versions before release. You can see these
relationships here:

https://github.com/opscode/omnibus-chef/blob/master/jenkins/chef.json#L131

That section shows that we use an Ubuntu 11.04 x64 system as a build
system for Ubuntu 11.04, 11.10, 12.04 & 12.10 x64 systems.

Bryan


#4

Folks,

looks like new chef server packages are not downloaded any more using
link below. Please let me know what is current way of getting latest
chef-server binary packages for ubuntu.

Thanks,
Kirill.

On 01/30/2013 11:51 AM, Kirill Timofeev wrote:

Folks,

I created the following script to automatically download latest chef
server 11 ubuntu packages and add them to local repository:

#!/bin/bash
set -u -e
exec >> $0.log 2>&1

PLATFORM=ubuntu
PLATFORM_VERSION=12.04
ARCHITECTURE=x86_64
MAX_LOG_SIZE=1000000

PKG_URL="http://www.opscode.com/chef/download-server?p={PLATFORM}&pv={PLATFORM_VERSION}&m=${ARCHITECTURE}&v=latest&prerelease=true&nightlies=true"
LOCATION_FILE=$HOME/chef-server-location

old_location=$(cat LOCATION_FILE) new_location=(curl -sIL “$PKG_URL”|grep ^Location)
[ “$old_location” == "new_location" ] && exit echo "(date) started"
wget -nv --content-disposition “$PKG_URL"
mv chef-server_11*.deb /var/www/deb-box/incoming/precise/testing
echo “$new_location” >LOCATION_FILE echo "(date) completed”
(($(stat -c %s $0.log) > $MAX_LOG_SIZE)) && mv $0.log $0.log.old

During last 3 days this script downloaded the following files:

chef-server_11.0.0-alpha.3+20130130075202.git.38.3332a80-1.ubuntu.11.04_amd64.deb
chef-server_11.0.0-alpha.3+20130128075214.git.37.d143b92-1.ubuntu.12.04_amd64.deb
chef-server_11.0.0-alpha.3+20130129075201.git.38.3332a80-1.ubuntu.11.04_amd64.deb
chef-server_11.0.0-alpha.3+20130129051708.git.38.3332a80-1.ubuntu.12.04_amd64.deb

Do I understand correctly that 11.04 in the name corresponds to ubuntu
version this package is intended for? If yes looks like setting pv
parameter doesn’t work as expected. May I ask somebody aware of details
clarify this?

Thanks,
Kirill.


#5

Krill,
Try setting the “prerelease” and “nightlies” query string parameters to “false”. This will ensure you are only pulling down the latest release builds. Here are a few example Omnitruck queries:

Latest Release

% curl -I "http://www.opscode.com/chef/download-server?p=ubuntu&pv=12.04&m=x86_64&v=latest&prerelease=false&nightlies=false"
HTTP/1.1 302 Found
Server: nginx/1.0.5
Date: Tue, 05 Feb 2013 20:50:57 GMT
Content-Type: text/html;charset=utf-8
Connection: keep-alive
Status: 302 Found
X-Frame-Options: sameorigin
X-XSS-Protection: 1; mode=block
Location: http://opscode-omnitruck-release.s3.amazonaws.com/ubuntu/12.04/x86_64/chef-server_11.0.4-1.ubuntu.12.04_amd64.deb
Content-Length: 0
P3P: CP=“CAO PSA OUR”

Latest Prerelease

% curl -I "http://www.opscode.com/chef/download-server?p=ubuntu&pv=12.04&m=x86_64&v=latest&prerelease=true&nightlies=false"
HTTP/1.1 302 Found
Server: nginx/1.0.5
Date: Tue, 05 Feb 2013 20:51:07 GMT
Content-Type: text/html;charset=utf-8
Connection: keep-alive
Status: 302 Found
X-Frame-Options: sameorigin
X-XSS-Protection: 1; mode=block
Location: http://opscode-omnitruck-release.s3.amazonaws.com/ubuntu/12.04/x86_64/chef-server_11.0.0-rc.1-1.ubuntu.12.04_amd64.deb
Content-Length: 0
P3P: CP=“CAO PSA OUR”

Latest Prerelease Nightly

% curl -I "http://www.opscode.com/chef/download-server?p=ubuntu&pv=12.04&m=x86_64&v=latest&prerelease=true&nightlies=true"
HTTP/1.1 302 Found
Server: nginx/1.0.5
Date: Tue, 05 Feb 2013 20:50:48 GMT
Content-Type: text/html;charset=utf-8
Connection: keep-alive
Status: 302 Found
X-Frame-Options: sameorigin
X-XSS-Protection: 1; mode=block
Location: http://opscode-omnitruck-release.s3.amazonaws.com/ubuntu/12.04/x86_64/chef-server_11.0.0-rc.0%2B20130202032017.git.6.9547c85-1.ubuntu.12.04_amd64.deb
Content-Length: 0
P3P: CP=“CAO PSA OUR”

More details about the available Omnitruck parameters here:
http://wiki.opscode.com/display/chef/Chef+11+Server+Preview#Chef11ServerPreview-AcquireInstallationPackage


Seth Chisamore
Software Development Engineer, Opscode, Inc.
IRC, Skype, Twitter, Github: schisamo

On Feb 5, 2013, at 1:28 PM, Kirill Timofeev kvt@hulu.com wrote:

Folks,

looks like new chef server packages are not downloaded any more using link below. Please let me know what is current way of getting latest chef-server binary packages for ubuntu.

Thanks,
Kirill.

On 01/30/2013 11:51 AM, Kirill Timofeev wrote:

Folks,

I created the following script to automatically download latest chef
server 11 ubuntu packages and add them to local repository:

#!/bin/bash
set -u -e
exec >> $0.log 2>&1

PLATFORM=ubuntu
PLATFORM_VERSION=12.04
ARCHITECTURE=x86_64
MAX_LOG_SIZE=1000000

PKG_URL="http://www.opscode.com/chef/download-server?p={PLATFORM}&pv={PLATFORM_VERSION}&m=${ARCHITECTURE}&v=latest&prerelease=true&nightlies=true"
LOCATION_FILE=$HOME/chef-server-location

old_location=$(cat LOCATION_FILE) new_location=(curl -sIL “$PKG_URL”|grep ^Location)
[ “$old_location” == "new_location" ] && exit echo "(date) started"
wget -nv --content-disposition “$PKG_URL"
mv chef-server_11*.deb /var/www/deb-box/incoming/precise/testing
echo “$new_location” >LOCATION_FILE echo "(date) completed”
(($(stat -c %s $0.log) > $MAX_LOG_SIZE)) && mv $0.log $0.log.old

During last 3 days this script downloaded the following files:

chef-server_11.0.0-alpha.3+20130130075202.git.38.3332a80-1.ubuntu.11.04_amd64.deb
chef-server_11.0.0-alpha.3+20130128075214.git.37.d143b92-1.ubuntu.12.04_amd64.deb
chef-server_11.0.0-alpha.3+20130129075201.git.38.3332a80-1.ubuntu.11.04_amd64.deb
chef-server_11.0.0-alpha.3+20130129051708.git.38.3332a80-1.ubuntu.12.04_amd64.deb

Do I understand correctly that 11.04 in the name corresponds to ubuntu
version this package is intended for? If yes looks like setting pv
parameter doesn’t work as expected. May I ask somebody aware of details
clarify this?

Thanks,
Kirill.


#6

Thanks for the information Seth, that worked!

On 02/05/2013 12:53 PM, Seth Chisamore wrote:

Krill,
Try setting the “prerelease” and “nightlies” query string parameters to “false”. This will ensure you are only pulling down the latest release builds. Here are a few example Omnitruck queries:

Latest Release

% curl -I "http://www.opscode.com/chef/download-server?p=ubuntu&pv=12.04&m=x86_64&v=latest&prerelease=false&nightlies=false"
HTTP/1.1 302 Found
Server: nginx/1.0.5
Date: Tue, 05 Feb 2013 20:50:57 GMT
Content-Type: text/html;charset=utf-8
Connection: keep-alive
Status: 302 Found
X-Frame-Options: sameorigin
X-XSS-Protection: 1; mode=block
Location: http://opscode-omnitruck-release.s3.amazonaws.com/ubuntu/12.04/x86_64/chef-server_11.0.4-1.ubuntu.12.04_amd64.deb
Content-Length: 0
P3P: CP=“CAO PSA OUR”

Latest Prerelease

% curl -I "http://www.opscode.com/chef/download-server?p=ubuntu&pv=12.04&m=x86_64&v=latest&prerelease=true&nightlies=false"
HTTP/1.1 302 Found
Server: nginx/1.0.5
Date: Tue, 05 Feb 2013 20:51:07 GMT
Content-Type: text/html;charset=utf-8
Connection: keep-alive
Status: 302 Found
X-Frame-Options: sameorigin
X-XSS-Protection: 1; mode=block
Location: http://opscode-omnitruck-release.s3.amazonaws.com/ubuntu/12.04/x86_64/chef-server_11.0.0-rc.1-1.ubuntu.12.04_amd64.deb
Content-Length: 0
P3P: CP=“CAO PSA OUR”

Latest Prerelease Nightly

% curl -I "http://www.opscode.com/chef/download-server?p=ubuntu&pv=12.04&m=x86_64&v=latest&prerelease=true&nightlies=true"
HTTP/1.1 302 Found
Server: nginx/1.0.5
Date: Tue, 05 Feb 2013 20:50:48 GMT
Content-Type: text/html;charset=utf-8
Connection: keep-alive
Status: 302 Found
X-Frame-Options: sameorigin
X-XSS-Protection: 1; mode=block
Location: http://opscode-omnitruck-release.s3.amazonaws.com/ubuntu/12.04/x86_64/chef-server_11.0.0-rc.0%2B20130202032017.git.6.9547c85-1.ubuntu.12.04_amd64.deb
Content-Length: 0
P3P: CP=“CAO PSA OUR”

More details about the available Omnitruck parameters here:
http://wiki.opscode.com/display/chef/Chef+11+Server+Preview#Chef11ServerPreview-AcquireInstallationPackage