vagrant-openshift 1.0.12 → 1.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/README.asciidoc +5 -3
  4. data/lib/vagrant-openshift/action/build_openshift3.rb +30 -5
  5. data/lib/vagrant-openshift/action/{install_rhc.rb → build_openshift3_base_images.rb} +13 -11
  6. data/lib/vagrant-openshift/action/{run_openshift2_tests.rb → build_sti.rb} +28 -11
  7. data/lib/vagrant-openshift/action/clean.rb +1 -4
  8. data/lib/vagrant-openshift/action/clean_network_setup.rb +1 -1
  9. data/lib/vagrant-openshift/action/download_artifacts_openshift3.rb +4 -1
  10. data/lib/vagrant-openshift/action/{download_artifacts_openshift2.rb → download_artifacts_sti.rb} +3 -11
  11. data/lib/vagrant-openshift/action/generate_template.rb +38 -40
  12. data/lib/vagrant-openshift/action/install_openshift3.rb +5 -16
  13. data/lib/vagrant-openshift/action/{build_openshift2.rb → install_openshift3_asset_dependencies.rb} +17 -5
  14. data/lib/vagrant-openshift/action/install_openshift3_base_dependencies.rb +20 -5
  15. data/lib/vagrant-openshift/action/{local_openshift2_checkout.rb → push_openshift3_release.rb} +14 -14
  16. data/lib/vagrant-openshift/action/run_openshift3_tests.rb +38 -14
  17. data/lib/vagrant-openshift/action/run_sti_tests.rb +64 -0
  18. data/lib/vagrant-openshift/action.rb +44 -83
  19. data/lib/vagrant-openshift/command/build_openshift3.rb +9 -0
  20. data/lib/vagrant-openshift/command/{build_openshift2_base.rb → build_openshift3_base_images.rb} +5 -5
  21. data/lib/vagrant-openshift/command/{build_openshift3_infrastructure_images.rb → build_sti.rb} +10 -12
  22. data/lib/vagrant-openshift/command/checkout_repositories.rb +1 -1
  23. data/lib/vagrant-openshift/command/{install_rhc.rb → install_openshift3_assets_base.rb} +5 -5
  24. data/lib/vagrant-openshift/command/local_openshift3_setup.rb +1 -1
  25. data/lib/vagrant-openshift/command/openshift_init.rb +4 -4
  26. data/lib/vagrant-openshift/command/push_openshift3_release.rb +57 -0
  27. data/lib/vagrant-openshift/command/repo_sync_openshift3.rb +1 -13
  28. data/lib/vagrant-openshift/command/{repo_sync_openshift2.rb → repo_sync_sti.rb} +11 -19
  29. data/lib/vagrant-openshift/command/test_openshift3.rb +8 -0
  30. data/lib/vagrant-openshift/command/test_openshift3_image.rb +8 -17
  31. data/lib/vagrant-openshift/command/test_sti.rb +59 -0
  32. data/lib/vagrant-openshift/config.rb +2 -14
  33. data/lib/vagrant-openshift/constants.rb +3 -67
  34. data/lib/vagrant-openshift/helper/command_helper.rb +0 -3
  35. data/lib/vagrant-openshift/plugin.rb +24 -29
  36. data/lib/vagrant-openshift/provisioner.rb +5 -37
  37. data/lib/vagrant-openshift/templates/builder/Rakefile +0 -205
  38. data/lib/vagrant-openshift/templates/command/init-openshift/box_info.yaml +34 -49
  39. data/lib/vagrant-openshift/version.rb +1 -1
  40. metadata +33 -48
  41. data/lib/vagrant-openshift/action/build_openshift3_images.rb +0 -54
  42. data/lib/vagrant-openshift/action/build_openshift3_infrastructure_images.rb +0 -50
  43. data/lib/vagrant-openshift/action/checkout_openshift2_tests.rb +0 -57
  44. data/lib/vagrant-openshift/action/create_openshift2_puppet_file.rb +0 -84
  45. data/lib/vagrant-openshift/action/create_openshift2_test_users.rb +0 -36
  46. data/lib/vagrant-openshift/action/idle_all_gears_openshift2.rb +0 -36
  47. data/lib/vagrant-openshift/action/install_openshift2_base_dependencies.rb +0 -50
  48. data/lib/vagrant-openshift/action/install_openshift2_build_dependencies.rb +0 -48
  49. data/lib/vagrant-openshift/action/preserve_mcollective_logs.rb +0 -48
  50. data/lib/vagrant-openshift/action/setup_builder_files.rb +0 -57
  51. data/lib/vagrant-openshift/action/uninstall_openshift2_rpms.rb +0 -37
  52. data/lib/vagrant-openshift/command/build_openshift3_images.rb +0 -68
  53. data/lib/vagrant-openshift/command/local_openshift2_setup.rb +0 -62
  54. data/lib/vagrant-openshift/command/test_openshift2.rb +0 -108
  55. data/lib/vagrant-openshift/templates/builder/lib/rpm.rb +0 -248
  56. data/lib/vagrant-openshift/templates/builder/lib/test.rb +0 -432
  57. data/lib/vagrant-openshift/templates/builder/yum-listbuilddep +0 -124
  58. data/lib/vagrant-openshift/templates/command/init-openshift/Vagrantfile.erb +0 -171
@@ -1,124 +0,0 @@
1
- #!/usr/bin/python -tt
2
-
3
- # This program is free software; you can redistribute it and/or modify
4
- # it under the terms of the GNU General Public License as published by
5
- # the Free Software Foundation; either version 2 of the License, or
6
- # (at your option) any later version.
7
- #
8
- # This program is distributed in the hope that it will be useful,
9
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
10
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
- # GNU General Public License for more details.
12
- #
13
- # You should have received a copy of the GNU General Public License
14
- # along with this program; if not, write to the Free Software Foundation,
15
- # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16
-
17
- import sys
18
- sys.path.insert(0,'/usr/share/yum-cli')
19
-
20
- import yum
21
- from yum.misc import setup_locale
22
- from yum.i18n import exception2msg
23
- import yum.Errors
24
- from utils import YumUtilBase
25
-
26
- import logging
27
- import rpmUtils
28
- import rpm
29
-
30
- rhn_source_repos = False
31
-
32
-
33
-
34
- class YumBuildDep(YumUtilBase):
35
- NAME = 'yum-listbuilddep'
36
- VERSION = '1.0'
37
- USAGE = 'yum-listbuilddep package1.spec [package2.spec] [...]'
38
-
39
- def __init__(self):
40
- YumUtilBase.__init__(self,
41
- YumBuildDep.NAME,
42
- YumBuildDep.VERSION,
43
- YumBuildDep.USAGE)
44
- self.logger = logging.getLogger("yum.verbose.cli.yumbuildep")
45
- # Add util commandline options to the yum-cli ones
46
- self.optparser = self.getOptionParser()
47
- if hasattr(rpm, 'reloadConfig'):
48
- self.optparser.add_option("--target",
49
- help="set target architecture for spec parsing")
50
- self.main()
51
-
52
- def main(self):
53
- # Parse the commandline option and setup the basics.
54
- try:
55
- opts = self.doUtilConfigSetup()
56
- except yum.Errors.RepoError, e:
57
- self.logger.error("Cannot handle specific enablerepo/disablerepo options.")
58
- sys.exit(50)
59
-
60
- # turn of our local gpg checking for opening the srpm if it is turned
61
- # off for repos :)
62
- if (opts.nogpgcheck or
63
- not self.conf.localpkg_gpgcheck or not self.conf.gpgcheck):
64
- self.ts.pushVSFlags((rpm._RPMVSF_NOSIGNATURES|rpm._RPMVSF_NODIGESTS))
65
-
66
- # Check if there is anything to do.
67
- if len(self.cmds) < 1:
68
- print self.optparser.format_help()
69
- sys.exit(0)
70
-
71
- try:
72
- self.get_build_deps(opts)
73
- except yum.Errors.MiscError, e:
74
- msg = "There was a problem getting the build deps, exiting:\n %s" % e
75
- self.logger.error(msg)
76
- sys.exit(1)
77
- sys.exit()
78
-
79
- def get_build_deps(self,opts):
80
- srcnames = []
81
- specnames = []
82
- srpms = []
83
- specworks = False
84
- reloadworks = False
85
-
86
- # See if we can use spec files for buildrequires
87
- if hasattr(rpm, 'spec') and hasattr(rpm.spec, 'sourceHeader'):
88
- specworks = True
89
- # See if we can reload rpm configuration
90
- if hasattr(rpm, 'reloadConfig'):
91
- reloadworks = True
92
-
93
- for arg in self.cmds:
94
- if specworks and arg.endswith('.spec'):
95
- specnames.append(arg)
96
-
97
- toActOn = []
98
- for name in specnames:
99
- # (re)load rpm config for target if set
100
- if reloadworks and opts.target:
101
- rpm.reloadConfig(opts.target)
102
-
103
- try:
104
- spec = rpm.spec(name)
105
- except ValueError:
106
- self.logger.error("Bad spec: %s" % name)
107
- continue
108
-
109
- # reset default rpm config after each parse to avoid side-effects
110
- if reloadworks:
111
- rpm.reloadConfig()
112
-
113
- buildreqs = []
114
- for d in rpm.ds(spec.sourceHeader, 'requires'):
115
- buildreqs.append(d.DNEVR()[2:])
116
-
117
- if len(buildreqs) > 0:
118
- self.logger.info('["%s"]' % '","'.join(buildreqs))
119
- else:
120
- self.logger.info('[]')
121
-
122
- if __name__ == '__main__':
123
- setup_locale()
124
- util = YumBuildDep()
@@ -1,171 +0,0 @@
1
- # -*- mode: ruby -*-
2
- # vi: set ft=ruby :
3
-
4
- VAGRANTFILE_API_VERSION = "2"
5
- Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
6
- # All Vagrant configuration is done here. The most common configuration
7
- # options are documented and commented below. For a complete reference,
8
- # please see the online documentation at vagrantup.com.
9
-
10
- # Create a private network, which allows host-only access to the machine
11
- # using a specific IP.
12
- # config.vm.network :private_network, ip: "192.168.33.10"
13
-
14
- # If true, then any SSH connections made will enable agent forwarding.
15
- # Default value: false
16
- # config.ssh.forward_agent = true
17
-
18
- # Share an additional folder to the guest VM. The first argument is
19
- # the path on the host to the actual folder. The second argument is
20
- # the path on the guest to mount the folder. And the optional third
21
- # argument is a set of non-required options.
22
- config.vm.synced_folder ".", "/vagrant", disabled: true
23
-
24
- gopath = nil
25
- if ENV['GOPATH'] && !ENV['GOPATH'].empty?
26
- gopath = File.expand_path(ENV['GOPATH'].split(/:/).last)
27
- vagrantfile = File.expand_path(File.dirname(__FILE__))
28
- if !vagrantfile.index(gopath)
29
- puts "\nYou have GOPATH set to '#{gopath}', which should contain your OpenShift source repositories, but are running from '#{vagrantfile}' instead.\n\nSet GOPATH='' when running vagrant or move your openshift repos under '#{gopath}/src/github.com/openshift'."
30
- else
31
- config.vm.synced_folder gopath, "/data", create: true
32
- end
33
- end
34
-
35
- # Box to load when booting the vagrant VM. This section applicable only to VirtualBox.
36
- # Other providers may override this value
37
- config.vm.box = "<%= box_info[:virtualbox][:box_name] %>"
38
- config.vm.box_url = "<%= box_info[:virtualbox][:box_url] %>"
39
- config.vm.hostname = 'openshift.example.com'
40
-
41
- # Provider-specific configuration so you can fine-tune various
42
- # backing providers for Vagrant.
43
- config.vm.provider :virtualbox do |vb|
44
- vb.gui = false
45
- vb.name = "<%= box_info[:instance_name] %>"
46
- vb.customize ["modifyvm", :id, "--memory", "2048"]
47
- <% box_info[:port_mappings].each do |guest_port,host_port| %>
48
- config.vm.network "forwarded_port", guest: <%=guest_port%>, host: <%=host_port%>
49
- <% end %>
50
- end
51
-
52
- config.vm.provider "vmware_fusion" do |vmf, override|
53
- vmf.gui = false
54
- vmf.name = "<%= box_info[:instance_name] %>"
55
- vmf.vmx["memsize"] = "2048"
56
- override.vm.box = "<%= box_info[:vmware][:box_name] %>"
57
- override.vm.box_url = "<%= box_info[:vmware][:box_url] %>"
58
- end
59
-
60
- config.vm.provider "vmware_workstation" do |vmw, override|
61
- vmw.gui = false
62
- vmw.name = "<%= box_info[:instance_name] %>"
63
- vmw.vmx["memsize"] = "2048"
64
- override.vm.box = "<%= box_info[:vmware][:box_name] %>"
65
- override.vm.box_url = "<%= box_info[:vmware][:box_url] %>"
66
- end
67
-
68
- config.vm.provider :aws do |aws, override|
69
- # You will need the latest AWS plugin for vagrant
70
- # https://github.com/mitchellh/vagrant-aws
71
-
72
- if gopath
73
- override.vm.synced_folder gopath, "/data", disabled: true
74
- end
75
-
76
- aws_creds_file = Pathname.new(File.expand_path("<%= box_info[:aws_creds_file]%>"))
77
- aws_creds = aws_creds_file.exist? ? Hash[*(File.open(aws_creds_file.to_s).readlines.map{ |l| l.split('=') }.flatten.map{ |i| i.strip })] : {}
78
-
79
- override.vm.box = "dummy"
80
- override.vm.box_url = "https://github.com/mitchellh/vagrant-aws/raw/master/dummy.box"
81
- override.ssh.username = "<%= box_info[:aws][:ssh_user] %>"
82
- override.ssh.private_key_path = aws_creds["AWSPrivateKeyPath"] || "PATH TO AWS KEYPAIR PRIVATE KEY"
83
-
84
- aws.access_key_id = aws_creds["AWSAccessKeyId"] || "AWS ACCESS KEY"
85
- aws.secret_access_key = aws_creds["AWSSecretKey"] || "AWS SECRET KEY"
86
- aws.keypair_name = aws_creds["AWSKeyPairName"] || "AWS KEYPAIR NAME"
87
- aws.ami = "<%= box_info[:aws][:ami] %>"
88
- aws.region = "<%= box_info[:aws][:ami_region] %>"
89
- aws.instance_type = "m3.large"
90
- aws.instance_ready_timeout = 240
91
- aws.tags = { "Name" => "<%= box_info[:instance_name] %>" }
92
- aws.user_data = %{
93
- #cloud-config
94
-
95
- growpart:
96
- mode: auto
97
- devices: ['/']
98
- runcmd:
99
- - [ sh, -xc, "echo 'Defaults:<%= box_info[:aws][:ami_ssh_user] %> \!requiretty' >> /etc/sudoers"]
100
- }
101
- aws.block_device_mapping = [
102
- {
103
- "DeviceName" => "/dev/sda",
104
- "Ebs.VolumeSize" => <%= box_info[:aws][:ebs_volume_size] %>,
105
- "Ebs.VolumeType" => "standard"
106
- }
107
- ]
108
- end
109
-
110
- config.vm.provider :openstack do |os, override|
111
- # You will need the latest vagrant-openstack-plugin
112
- # https://github.com/cloudbau/vagrant-openstack-plugin
113
-
114
- if gopath
115
- override.vm.synced_folder gopath, "/data", disabled: true
116
- end
117
-
118
- os_creds_file = Pathname.new(File.expand_path("<%= box_info[:openstack_creds_file]%>"))
119
- os_creds = os_creds_file.exist? ? Hash[*(File.open(os_creds_file.to_s).readlines.map{ |l| l.split('=') }.flatten.map{ |i| i.strip })] : {}
120
-
121
- override.vm.box = "dummy"
122
- override.vm.box_url = "https://github.com/cloudbau/vagrant-openstack-plugin/raw/master/dummy.box"
123
- override.ssh.private_key_path = os_creds["OSPrivateKeyPath"] || "PATH TO OPENSTACK KEYPAIR PRIVATE KEY"
124
-
125
- os.endpoint = os_creds["OSEndpoint"] || "OPENSTACK ENDPOINT URL"
126
- os.tenant = os_creds["OSTenant"] || "OPENSTACK TENANT"
127
- os.username = os_creds["OSUsername"] || "OPENSTACK USERNAME"
128
- os.api_key = os_creds["OSAPIKey"] || "OPENSTACK PASSWORD"
129
- os.flavor = "m1.large"
130
- os.image = "<%= box_info[:openstack][:image] %>"
131
- os.keypair_name = os_creds["OSKeyPairName"] || "OPENSTACK KEYPAIR NAME"
132
- os.ssh_username = "<%= box_info[:openstack][:ssh_username] %>"
133
- os.server_name = "<%= box_info[:instance_name] %>"
134
- os.networks = []
135
- os.user_data = %{
136
- #cloud-config
137
-
138
- growpart:
139
- mode: auto
140
- devices: ['/']
141
- runcmd:
142
- - [ sh, -xc, "echo 'Defaults:<%= box_info[:openstack][:ssh_username] %> \!requiretty' >> /etc/sudoers"]
143
- }
144
- end
145
-
146
- config.vm.provision :openshift
147
- config.vm.guest = :<%= box_info[:vagrant_guest]%>
148
-
149
- # Domain zone under which application will be created. Eg: appname.namespace.example.com
150
- config.openshift.cloud_domain = "example.com"
151
-
152
- # Packages that are part of OpenShift Origin code but should not be compiled or installed
153
- config.openshift.ignore_packages = [
154
- 'openshift-origin-util',
155
- 'rubygem-openshift-origin-container-libvirt',
156
- 'openshift-origin-cartridge-jbosseap',
157
- 'openshift-origin-cartridge-jbossews',
158
- 'openshift-origin-cartridge-jbossas',
159
- 'avahi-cname-manager',
160
- 'rubygem-openshift-origin-dns-avahi',
161
- 'openshift-origin-cartridge-mariadb',
162
- ]
163
-
164
- # Any additional services on the machine which should be restarted after installing OpenShift packages
165
- # config.openshift.additional_services = [
166
- # ]
167
-
168
- # Advanced settings to be copied into puppet manifest
169
- # config.openshift.advanced_puppet_values = {
170
- # }
171
- end