Skip to content

Instantly share code, notes, and snippets.

@drnic
Created March 18, 2014 20:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save drnic/9628897 to your computer and use it in GitHub Desktop.
Save drnic/9628897 to your computer and use it in GitHub Desktop.
Rake tasks to display the stages to be used in bosh stemcells. Put the stemcell_debug file in /bosh/bosh-dev/lib/bosh/dev/tasks/stemcell_debug.rake
$ bundle exec rake stemcell:show_stages_os_image[ubuntu]
base_debootstrap
base_apt
bosh_dpkg_list
bosh_sysstat
bosh_sysctl
system_kernel
bosh_users
bosh_monit
bosh_ntpdate
bosh_sudoers
rsyslog
system_grub
$ bundle exec rake stemcell:show_stages_with_local_os_image[openstack,ubuntu,ruby]
bosh_ruby
bosh_agent
bosh_micro
system_openstack_network
system_openstack_clock
system_openstack_modules
system_parameters
bosh_clean
bosh_harden
bosh_harden_ssh
image_create
image_install_grub
image_openstack_qcow2
image_openstack_prepare_stemcell
stemcell_openstack
namespace :stemcell do
desc 'Build a base OS image for use in stemcells'
task :show_stages_os_image, [:operating_system_name] do |_, args|
require 'bosh/dev/build'
require 'bosh/stemcell/archive_handler'
require 'bosh/stemcell/build_environment'
require 'bosh/stemcell/definition'
require 'bosh/stemcell/os_image_builder'
require 'bosh/stemcell/stage_collection'
require 'bosh/stemcell/stage_runner'
definition = Bosh::Stemcell::Definition.for('null', args.operating_system_name, 'null')
collection = Bosh::Stemcell::StageCollection.new(definition)
collection.operating_system_stages.each {|stage| puts stage}
end
task :show_stages_with_local_os_image, [:infrastructure_name, :operating_system_name, :agent_name] do |_, args|
require 'bosh/dev/build'
require 'bosh/dev/gem_components'
require 'bosh/stemcell/build_environment'
require 'bosh/stemcell/definition'
require 'bosh/stemcell/stage_collection'
require 'bosh/stemcell/stage_runner'
require 'bosh/stemcell/stemcell_builder'
# build stemcell
definition = Bosh::Stemcell::Definition.for(args.infrastructure_name, args.operating_system_name, args.agent_name)
collection = Bosh::Stemcell::StageCollection.new(definition)
collection.agent_stages.each {|stage| puts stage}
collection.infrastructure_stages.each {|stage| puts stage}
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment