Fix module structure

Fixes so that the top level structure
of the modules conform to the puppet standard [1].

[1] https://puppet.com/docs/puppet/5.3/modules_fundamentals.html#module-structure

Change-Id: Id295bb47c0fb2ffdfd5087400ec077af87a78382
This commit is contained in:
Tobias Urdin 2018-12-12 11:32:28 +01:00
parent 091c01b7b8
commit 35cd87302f
6 changed files with 0 additions and 154 deletions

View File

@ -1,86 +0,0 @@
#!/usr/bin/env ruby
#
# test that we can upload and download files
#
require 'open3'
require 'fileutils'
keystone_public = '127.0.0.1'
image_dir='/tmp/images'
ENV['OS_USERNAME']='admin'
ENV['OS_TENANT_NAME']='admin'
ENV['OS_PASSWORD']='ChangeMe'
ENV['OS_AUTH_URL']='http://127.0.0.1:5000/v2.0/'
ENV['OS_REGION_NAME']='RegionOne'
FileUtils.mkdir_p(image_dir)
Dir.chdir(image_dir) do |dir|
kernel_id = nil
initrd_id = nil
remote_image_url='http://smoser.brickies.net/ubuntu/ttylinux-uec/ttylinux-uec-amd64-12.1_2.6.35-22_1.tar.gz; tar -zxvf ttylinux-uec-amd64-12.1_2.6.35-22_1.tar.gz'
wget_command = "wget #{remote_image_url}"
Open3.popen3(wget_command) do |stdin, stdout, stderr|
puts "wget stdout: #{stdout.read}"
puts "wget stderr: #{stderr.read}"
end
add_kernel='disk_format=aki container_format=aki < ttylinux-uec-amd64-12.1_2.6.35-22_1-vmlinuz'
kernel_name='tty-linux-kernel'
kernel_format='aki'
add_kernel_command="glance add name='#{kernel_name}' disk_format='#{kernel_format}' container_format=#{kernel_format} < ttylinux-uec-amd64-12.1_2.6.35-22_1-vmlinuz"
Open3.popen3(add_kernel_command) do |stdin, stdout, stderr|
stdout = stdout.read.split("\n")
stdout.each do |line|
if line =~ /Added new image with ID: (\w+)/
kernel_id = $1
end
end
puts stderr.read
puts stdout
end
raise(Exception, 'Did not add kernel successfully') unless kernel_id
initrd_id = nil
add_initrd_command="glance add name='tty-linux-ramdisk' disk_format=ari container_format=ari < ttylinux-uec-amd64-12.1_2.6.35-22_1-loader"
Open3.popen3(add_initrd_command) do |stdin, stdout, stderr|
stdout = stdout.read.split("\n")
stdout.each do |line|
if line =~ /Added new image with ID: (\w+)/
initrd_id = $1
end
end
puts stderr.read
puts stdout
end
raise(Exception, 'Did not add initrd successfully') unless initrd_id
add_image_command="glance add name='tty-linux' disk_format=ami container_format=ami kernel_id=#{kernel_id} ramdisk_id=#{initrd_id} < ttylinux-uec-amd64-12.1_2.6.35-22_1.img"
Open3.popen3(add_image_command) do |stdin, stdout, stderr|
stdout = stdout.read.split("\n")
stdout.each do |line|
if line =~ /Added new image with ID: (\w+)/
kernel_id = $1
end
end
puts stderr.read
puts stdout
end
get_index='glance index'
Open3.popen3(get_index) do |stdin, stdout, stderr|
puts stdout.read
puts stderr.read
end
end

View File

@ -1,8 +0,0 @@
#!/bin/bash
#
# assumes that resonable credentials have been stored at
# /root/auth
source /root/auth
wget http://uec-images.ubuntu.com/releases/11.10/release/ubuntu-11.10-server-cloudimg-amd64-disk1.img
glance add name="Ubuntu 11.10 cloudimg amd64" is_public=true container_format=ovf disk_format=qcow2 < ubuntu-11.10-server-cloudimg-amd64-disk1.img
glance index

View File

@ -1,3 +0,0 @@
class { '::glance::api':
debug => true,
}

View File

@ -1 +0,0 @@
class { '::glance': }

View File

@ -1,3 +0,0 @@
class { '::glance::registry':
debug => true,
}

View File

@ -1,53 +0,0 @@
# uses the keystone packages
# to ensure that we use the latest precise packages
Exec { logoutput => 'on_failure' }
node 'glance_keystone_mysql' {
class { '::mysql::server': }
class { '::keystone':
debug => true,
catalog_type => 'sql',
admin_token => 'admin_token',
}
class { '::keystone::db::mysql':
password => 'keystone',
}
class { '::keystone::roles::admin':
email => 'test@puppetlabs.com',
password => 'ChangeMe',
}
class { '::glance::api':
debug => true,
auth_type => 'keystone',
keystone_tenant => 'services',
keystone_user => 'glance',
keystone_password => 'glance_password',
database_connection => 'mysql+pymysql://glance:glance@127.0.0.1/glance',
}
class { '::glance::backend::file': }
class { '::glance::db::mysql':
password => 'glance',
dbname => 'glance',
user => 'glance',
host => '127.0.0.1',
# allowed_hosts = undef,
# $cluster_id = 'localzone'
}
class { '::glance::registry':
debug => true,
auth_type => 'keystone',
keystone_tenant => 'services',
keystone_user => 'glance',
keystone_password => 'glance_password',
database_connection => 'mysql+pymysql://glance:glance@127.0.0.1/glance',
}
class { '::glance::keystone::auth':
password => 'glance_pass',
}
}
node default {
fail("could not find a matching node entry for ${clientcert}")
}