vagrant-openshift 3.0.8 → 3.0.9

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 (49) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +6 -1
  3. data/Gemfile +5 -1
  4. data/README.asciidoc +65 -78
  5. data/hack/test.sh +135 -0
  6. data/hack/update.sh +32 -0
  7. data/lib/vagrant-openshift.rb +1 -0
  8. data/lib/vagrant-openshift/action.rb +83 -12
  9. data/lib/vagrant-openshift/action/build_origin_images.rb +2 -2
  10. data/lib/vagrant-openshift/action/create_yum_repositories.rb +1 -1
  11. data/lib/vagrant-openshift/action/download_artifacts_origin_console.rb +2 -2
  12. data/lib/vagrant-openshift/action/download_artifacts_origin_metrics.rb +67 -0
  13. data/lib/vagrant-openshift/action/install_docker.rb +54 -0
  14. data/lib/vagrant-openshift/action/install_golang.rb +52 -0
  15. data/lib/vagrant-openshift/action/install_origin_asset_dependencies.rb +6 -3
  16. data/lib/vagrant-openshift/action/install_origin_base_dependencies.rb +22 -237
  17. data/lib/vagrant-openshift/action/install_origin_rhel7.rb +29 -6
  18. data/lib/vagrant-openshift/action/push_openshift_images.rb +26 -37
  19. data/lib/vagrant-openshift/action/run_customer_diagnostics_tests.rb +79 -0
  20. data/lib/vagrant-openshift/action/run_origin_asset_tests.rb +1 -3
  21. data/lib/vagrant-openshift/action/run_origin_metrics_tests.rb +83 -0
  22. data/lib/vagrant-openshift/action/run_origin_tests.rb +9 -4
  23. data/lib/vagrant-openshift/command/checkout_repositories.rb +1 -3
  24. data/lib/vagrant-openshift/command/create_local_yum_repo.rb +2 -2
  25. data/lib/vagrant-openshift/command/download_artifacts_origin_metrics.rb +49 -0
  26. data/lib/vagrant-openshift/command/install_docker.rb +68 -0
  27. data/lib/vagrant-openshift/command/install_golang.rb +68 -0
  28. data/lib/vagrant-openshift/command/repo_sync_customer_diagnostics.rb +71 -0
  29. data/lib/vagrant-openshift/command/repo_sync_origin_metrics.rb +71 -0
  30. data/lib/vagrant-openshift/command/test_customer_diagnostics.rb +69 -0
  31. data/lib/vagrant-openshift/command/test_origin_image.rb +1 -1
  32. data/lib/vagrant-openshift/command/test_origin_metrics.rb +67 -0
  33. data/lib/vagrant-openshift/constants.rb +8 -2
  34. data/lib/vagrant-openshift/helper/command_helper.rb +63 -39
  35. data/lib/vagrant-openshift/helper/install_helper.rb +139 -0
  36. data/lib/vagrant-openshift/plugin.rb +37 -2
  37. data/lib/vagrant-openshift/resources/configure_docker.sh +53 -0
  38. data/lib/vagrant-openshift/resources/configure_system.sh +23 -0
  39. data/lib/vagrant-openshift/resources/install_chrome.sh +22 -0
  40. data/lib/vagrant-openshift/resources/install_dependencies.sh +58 -0
  41. data/lib/vagrant-openshift/resources/install_nonessential.sh +6 -0
  42. data/lib/vagrant-openshift/resources/install_rhaos_repos.sh +11 -0
  43. data/lib/vagrant-openshift/resources/reconfigure_network_fedora.sh +13 -0
  44. data/lib/vagrant-openshift/resources/rhaos31.repo +13 -0
  45. data/lib/vagrant-openshift/resources/rhaos32.repo +13 -0
  46. data/lib/vagrant-openshift/resources/rhaos33.repo +13 -0
  47. data/lib/vagrant-openshift/resources/rhaos34.repo +13 -0
  48. data/lib/vagrant-openshift/version.rb +1 -1
  49. metadata +29 -3
@@ -0,0 +1,68 @@
1
+ #--
2
+ # Copyright 2016 Red Hat, Inc.
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+ #++
16
+ require_relative "../action"
17
+
18
+ module Vagrant
19
+ module Openshift
20
+ module Commands
21
+ class InstallDocker < Vagrant.plugin(2, :command)
22
+ include CommandHelper
23
+
24
+ def self.synopsis
25
+ "install docker"
26
+ end
27
+
28
+ def execute
29
+ options = {}
30
+ options[:"docker.repourls"] = []
31
+ options[:"docker.reponames"] = []
32
+
33
+ opts = OptionParser.new do |o|
34
+ o.banner = "Usage: vagrant install-docker [vm-name]"
35
+ o.separator ""
36
+
37
+ o.on("--repourl [name]", String, "URL of a repository file to use when installing Docker.") do |f|
38
+ options[:"docker.repourls"] << f
39
+ end
40
+
41
+ o.on("--repo [name]", String, "Name of a repository to enable when installing Docker. Defaults to use all available repositories.") do |f|
42
+ options[:"docker.reponames"] << f
43
+ end
44
+
45
+ o.on("--docker.version [version]", String, "Install the specified Docker version. Leave empty to install latest available.") do |f|
46
+ options[:"docker.version"] = f
47
+ end
48
+
49
+ o.on("--force", String, "Uninstall Docker to swap in the new version, even if the uninstall is unclean.") do |f|
50
+ options[:force] = true
51
+ end
52
+
53
+ end
54
+
55
+ # Parse the options
56
+ argv = parse_options(opts)
57
+ return if !argv
58
+
59
+ with_target_vms(argv, :reverse => true) do |machine|
60
+ actions = Vagrant::Openshift::Action.install_docker(options)
61
+ @env.action_runner.run actions, {:machine => machine}
62
+ 0
63
+ end
64
+ end
65
+ end
66
+ end
67
+ end
68
+ end
@@ -0,0 +1,68 @@
1
+ #--
2
+ # Copyright 2016 Red Hat, Inc.
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+ #++
16
+ require_relative "../action"
17
+
18
+ module Vagrant
19
+ module Openshift
20
+ module Commands
21
+ class InstallGolang < Vagrant.plugin(2, :command)
22
+ include CommandHelper
23
+
24
+ def self.synopsis
25
+ "install golang"
26
+ end
27
+
28
+ def execute
29
+ options = {}
30
+ options[:"golang.repourls"] = []
31
+ options[:"golang.reponames"] = []
32
+
33
+ opts = OptionParser.new do |o|
34
+ o.banner = "Usage: vagrant install-golang [vm-name]"
35
+ o.separator ""
36
+
37
+ o.on("--repourl [name]", String, "URL of a repository file to use when installing Golang.") do |f|
38
+ options[:"golang.repourls"] << f
39
+ end
40
+
41
+ o.on("--repo [name]", String, "Name of a repository to enable when installing Golang. Defaults to use all available repositories.") do |f|
42
+ options[:"golang.reponames"] << f
43
+ end
44
+
45
+ o.on("--golang.version [version]", String, "Install the specified Golang version. Leave empty to install latest available.") do |f|
46
+ options[:"golang.version"] = f
47
+ end
48
+
49
+ o.on("--force", String, "Uninstall Golang to swap in the new version, even if the uninstall is unclean.") do |f|
50
+ options[:force] = true
51
+ end
52
+
53
+ end
54
+
55
+ # Parse the options
56
+ argv = parse_options(opts)
57
+ return if !argv
58
+
59
+ with_target_vms(argv, :reverse => true) do |machine|
60
+ actions = Vagrant::Openshift::Action.install_golang(options)
61
+ @env.action_runner.run actions, {:machine => machine}
62
+ 0
63
+ end
64
+ end
65
+ end
66
+ end
67
+ end
68
+ end
@@ -0,0 +1,71 @@
1
+ #--
2
+ # Copyright 2016 Red Hat, Inc.
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+ #++
16
+ require_relative "../action"
17
+
18
+ module Vagrant
19
+ module Openshift
20
+ module Commands
21
+ class RepoSyncCustomerDiagnostics < Vagrant.plugin(2, :command)
22
+ include CommandHelper
23
+
24
+ def self.synopsis
25
+ "syncs your local repos to the current instance"
26
+ end
27
+
28
+ def execute
29
+ options = {}
30
+ options[:images] = true
31
+ options[:build] = true
32
+ options[:clean] = false
33
+ options[:source] = false
34
+ options[:repo] = 'openshift-ansible'
35
+
36
+ opts = OptionParser.new do |o|
37
+ o.banner = "Usage: vagrant sync-customer-diagnostics [vm-name]"
38
+ o.separator ""
39
+
40
+ o.on("-s", "--source", "Sync the source (not required if using synced folders)") do |f|
41
+ options[:source] = f
42
+ end
43
+
44
+ o.on("-c", "--clean", "Delete existing repo before syncing source") do |f|
45
+ options[:clean] = f
46
+ end
47
+
48
+ o.on("--dont-install", "Don't build and install updated source") do |f|
49
+ options[:build] = false
50
+ end
51
+
52
+ o.on("--no-images", "Don't build updated component Docker images") do |f|
53
+ options[:images] = false
54
+ end
55
+
56
+ end
57
+
58
+ # Parse the options
59
+ argv = parse_options(opts)
60
+ return if !argv
61
+
62
+ with_target_vms(argv, :reverse => true) do |machine|
63
+ actions = Vagrant::Openshift::Action.repo_sync_customer_diagnostics(options)
64
+ @env.action_runner.run actions, {:machine => machine}
65
+ 0
66
+ end
67
+ end
68
+ end
69
+ end
70
+ end
71
+ end
@@ -0,0 +1,71 @@
1
+ #--
2
+ # Copyright 2016 Red Hat, Inc.
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+ #++
16
+ require_relative "../action"
17
+
18
+ module Vagrant
19
+ module Openshift
20
+ module Commands
21
+ class RepoSyncOriginMetrics < Vagrant.plugin(2, :command)
22
+ include CommandHelper
23
+
24
+ def self.synopsis
25
+ "syncs your local repos to the current instance"
26
+ end
27
+
28
+ def execute
29
+ options = {}
30
+ options[:images] = true
31
+ options[:build] = true
32
+ options[:clean] = false
33
+ options[:source] = false
34
+ options[:repo] = 'origin-metrics'
35
+
36
+ opts = OptionParser.new do |o|
37
+ o.banner = "Usage: vagrant sync-origin-metrics [vm-name]"
38
+ o.separator ""
39
+
40
+ o.on("-s", "--source", "Sync the source (not required if using synced folders)") do |f|
41
+ options[:source] = f
42
+ end
43
+
44
+ o.on("-c", "--clean", "Delete existing repo before syncing source") do |f|
45
+ options[:clean] = f
46
+ end
47
+
48
+ o.on("--dont-install", "Don't build and install updated source") do |f|
49
+ options[:build] = false
50
+ end
51
+
52
+ o.on("--no-images", "Don't build updated component Docker images") do |f|
53
+ options[:images] = false
54
+ end
55
+
56
+ end
57
+
58
+ # Parse the options
59
+ argv = parse_options(opts)
60
+ return if !argv
61
+
62
+ with_target_vms(argv, :reverse => true) do |machine|
63
+ actions = Vagrant::Openshift::Action.repo_sync_origin_metrics(options)
64
+ @env.action_runner.run actions, {:machine => machine}
65
+ 0
66
+ end
67
+ end
68
+ end
69
+ end
70
+ end
71
+ end
@@ -0,0 +1,69 @@
1
+ #--
2
+ # Copyright 2016 Red Hat, Inc.
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+ #++
16
+ require_relative "../action"
17
+
18
+ module Vagrant
19
+ module Openshift
20
+ module Commands
21
+ class TestCustomerDiagnostics < Vagrant.plugin(2, :command)
22
+ include CommandHelper
23
+
24
+ def self.synopsis
25
+ "run the customer diagnostics tests"
26
+ end
27
+
28
+ def execute
29
+ options = {}
30
+ options[:download] = false
31
+ options[:target] = 'test-integration'
32
+
33
+ opts = OptionParser.new do |o|
34
+ o.banner = "Usage: vagrant test-customer-diagnostics [machine-name]"
35
+ o.separator ""
36
+
37
+ o.on("", "--root", String, "Run tests as root") do |f|
38
+ options[:root] = true
39
+ end
40
+
41
+ o.on("-d","--artifacts", String, "Download logs") do |f|
42
+ options[:download] = true
43
+ end
44
+
45
+ o.on("", "--env ENV=VALUE", String, "Environment variable to execute tests with") do |f|
46
+ options[:envs] = [] unless options[:envs]
47
+ options[:envs] << f
48
+ end
49
+
50
+ o.on("-t", "--target MAKEFILE_TARGETS", String, "Arguments to pass to the repository Makefile") do |f|
51
+ options[:target] = f
52
+ end
53
+
54
+ end
55
+
56
+ # Parse the options
57
+ argv = parse_options(opts)
58
+ return if !argv
59
+
60
+ with_target_vms(argv, :reverse => true) do |machine|
61
+ actions = Vagrant::Openshift::Action.run_customer_diagnostics_tests(options)
62
+ @env.action_runner.run actions, {:machine => machine}
63
+ 0
64
+ end
65
+ end
66
+ end
67
+ end
68
+ end
69
+ end
@@ -132,7 +132,7 @@ if [ "#{base_images}" == "true" -a -n "#{registry}" ]; then
132
132
  docker pull #{registry}/openshift/base-rhel7 && docker tag #{registry}/openshift/base-rhel7 openshift/base-rhel7
133
133
  fi
134
134
 
135
- if ! sudo env "PATH=$PATH" SKIP_SQUASH=1 make test TARGET=rhel7; then
135
+ if ! sudo env "PATH=$PATH" SKIP_SQUASH=1 SKIP_RHEL_SCL=1 make test TARGET=rhel7; then
136
136
  echo "ERROR: #{image}-rhel7 failed testing."
137
137
  exit 1
138
138
  fi
@@ -0,0 +1,67 @@
1
+ #--
2
+ # Copyright 2016 Red Hat, Inc.
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+ #++
16
+ require_relative "../action"
17
+
18
+ module Vagrant
19
+ module Openshift
20
+ module Commands
21
+ class TestOriginMetrics < Vagrant.plugin(2, :command)
22
+ include CommandHelper
23
+
24
+ def self.synopsis
25
+ "run the origin-metrics tests"
26
+ end
27
+
28
+ def execute
29
+ options = {}
30
+ options[:download] = false
31
+
32
+ opts = OptionParser.new do |o|
33
+ o.banner = "Usage: vagrant test-origin-metrics [machine-name]"
34
+ o.separator ""
35
+
36
+ o.on("", "--root", String, "Run tests as root") do |f|
37
+ options[:root] = true
38
+ end
39
+
40
+ o.on("-d","--artifacts", String, "Download logs") do |f|
41
+ options[:download] = true
42
+ end
43
+
44
+ o.on("-r","--image-registry", String, "Image registry to configure tests with") do |f|
45
+ options[:image_registry] = f
46
+ end
47
+
48
+ o.on("", "--env ENV=VALUE", String, "Environment variable to execute tests with") do |f|
49
+ options[:envs] = [] unless options[:envs]
50
+ options[:envs] << f
51
+ end
52
+ end
53
+
54
+ # Parse the options
55
+ argv = parse_options(opts)
56
+ return if !argv
57
+
58
+ with_target_vms(argv, :reverse => true) do |machine|
59
+ actions = Vagrant::Openshift::Action.run_origin_metrics_tests(options)
60
+ @env.action_runner.run actions, {:machine => machine}
61
+ 0
62
+ end
63
+ end
64
+ end
65
+ end
66
+ end
67
+ end
@@ -31,7 +31,7 @@ module Vagrant
31
31
  {
32
32
  'origin' => 'https://github.com/openshift/origin.git',
33
33
  'source-to-image' => 'https://github.com/openshift/source-to-image.git',
34
- 'origin-web-console' => 'https://github.com/openshift/origin-web-console.git'
34
+ 'origin-web-console' => 'https://github.com/openshift/origin-web-console.git'
35
35
  }
36
36
  end
37
37
 
@@ -52,7 +52,13 @@ module Vagrant
52
52
  'origin' => openshift_repos,
53
53
  nil => openshift_repos,
54
54
  'origin-console' => console_repos,
55
- 'origin-aggregated-logging' => aggregated_logging_repos
55
+ 'origin-aggregated-logging' => aggregated_logging_repos,
56
+ 'origin-metrics' => {
57
+ 'origin-metrics' => 'https://github.com/openshift/origin-metrics.git'
58
+ },
59
+ 'openshift-ansible' => {
60
+ 'openshift-ansible' => 'https://github.com/openshift/openshift-ansible.git'
61
+ }
56
62
  }[reponame]
57
63
  end
58
64