vagrant-openshift 2.0.6 → 2.0.7

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6c1750fd41174a13573997e9f8237cd2e1345298
4
- data.tar.gz: 8d477fbaad3c34dc70732eacaed89cefaa5f16be
3
+ metadata.gz: 40e78c1297ab90fde0f17d934350f42056d76894
4
+ data.tar.gz: 980f13e1b3b756609eef588d963d64e499c830d0
5
5
  SHA512:
6
- metadata.gz: 49f56d0a750c5b113e2ce62d7b94b71c50afc53cad602840817d81926ab8c8e3efcac81e4271cd5b594ea9e7b3c332f78d39d07f1afde9847ce1cce5e7a6af07
7
- data.tar.gz: 59862d1d48a8d743fd54d4f697e3b5879ba408e76de9897a3947deef156bb602516bf170a0622ff5d37ca75377c1909161bd749a6ecc9cc10370f5c412809612
6
+ metadata.gz: a9a31ebe5362163ca70c47978bb2b0d8eccd80916c009345569abfdf20a777418b17eb6340c63be9681b58b386ac61f626553daf1c1405d3ce49e8b2c2c46e6d
7
+ data.tar.gz: a11f6401a83fd85e2a5fa1155c22fe99d5201b1c3e633363f1cec743e34937c80199ab85223d8f5f0c6817df1ef27103d967c4f6b7a6367d4ea282f027ace256
data/README.asciidoc CHANGED
@@ -88,7 +88,7 @@ you may modify later to match your vagrant requirements:
88
88
 
89
89
  [source, sh]
90
90
  ----
91
- $ vagrant origin-init --stage inst --os (fedora|centos7|rhel7) <instance name>
91
+ $ vagrant origin-init --stage inst --os (fedora|centos7|rhel7|rhelatomic7) <instance name>
92
92
  ----
93
93
 
94
94
  ==== Start the machine
@@ -179,7 +179,7 @@ AWSPrivateKeyPath=<SSH Private key>
179
179
 
180
180
  [source, sh]
181
181
  ----
182
- $ vagrant origin-init --stage inst --os (fedora|centos7|rhel7) <instance name>
182
+ $ vagrant origin-init --stage inst --os (fedora|centos7|rhel7|rhelatomic7) <instance name>
183
183
  ----
184
184
 
185
185
  The instance name will be applied as a tag and should generally be
@@ -31,7 +31,8 @@ module Vagrant
31
31
  def call(env)
32
32
  os = @options[:os].to_sym
33
33
  stage = @options[:stage].to_sym
34
- instance_type = @options[:instance_type].to_sym
34
+ instance_type = @options[:instance_type]
35
+ volume_size = @options[:volume_size]
35
36
  inst_ts = Time.now.getutc.strftime('%Y%m%d_%H%M')
36
37
 
37
38
  box_info_path = Pathname.new(File.expand_path("#{__FILE__}/../../templates/command/init-openshift/box_info.yaml"))
@@ -40,7 +41,7 @@ module Vagrant
40
41
  box_info = box_info_data[os][stage]
41
42
  box_info[:instance_name] = @options[:name].nil? ? 'openshift_origin_' + inst_ts : @options[:name]
42
43
  box_info[:os] = os
43
- box_info[:vagrant_guest] = [:centos7, :rhel7].include?(os) ? :redhat : os
44
+ box_info[:vagrant_guest] = [:centos7, :rhel7, :rhelatomic7].include?(os) ? :redhat : os
44
45
  box_info[:port_mappings] = @options[:port_mappings]
45
46
 
46
47
  @openstack_creds_file = ENV['OPENSTACK_CREDS'].nil? || ENV['OPENSTACK_CREDS'] == '' ? "~/.openstackcred" : ENV['OPENSTACK_CREDS']
@@ -68,7 +69,8 @@ module Vagrant
68
69
  'cpus' => 2,
69
70
  'memory' => 2048,
70
71
  'rebuild_yum_cache' => false,
71
- 'instance_type' => instance_type
72
+ 'instance_type' => instance_type,
73
+ 'volume_size' => volume_size
72
74
  }
73
75
 
74
76
  vagrant_openshift_config['no_synced_folders'] = @options[:no_synced_folders]
@@ -30,17 +30,18 @@ module Vagrant
30
30
  # registry here already.
31
31
  def fix_insecure_registry_cmd(registry_url)
32
32
  %{
33
+ sudo chmod a+rw /etc/sysconfig/docker
33
34
  cat <<EOF > /etc/sysconfig/docker
34
35
  OPTIONS='--insecure-registry #{registry_url} --selinux-enabled'
35
36
  EOF
36
- systemctl restart docker
37
+ sudo systemctl restart docker
37
38
  }
38
39
  end
39
40
 
40
41
  def push_image(image_name, git_ref, registry)
41
42
  %{
42
43
  set -e
43
- pushd /data/src/github/openshift/#{image_name}
44
+ pushd /tmp/images/#{image_name}
44
45
  git checkout #{git_ref}
45
46
  git_ref=$(git rev-parse --short HEAD)
46
47
  echo "Pushing image #{image_name}:$git_ref..."
@@ -59,36 +60,40 @@ docker tag -f #{image_name}-rhel7 #{registry}#{image_name}-rhel7:latest
59
60
 
60
61
  # We can't fully parallelize this because docker fails when you push to the same repo at the
61
62
  # same time (using different tags), so we do two groups of push operations.
63
+
64
+ # this one is failing in parallel for unknown reasons
65
+ docker push -f #{registry}#{image_name}-rhel7:$git_ref
66
+
62
67
  procs[0]="docker push -f #{registry}#{image_name}-centos7:$git_ref"
63
68
  procs[1]="docker push -f docker.io/#{image_name}-centos7:latest"
64
- procs[2]="docker push -f #{registry}#{image_name}-rhel7:$git_ref"
69
+ #procs[2]="docker push -f #{registry}#{image_name}-rhel7:$git_ref"
65
70
 
66
71
  # Run pushes in parallel
67
- for i in {0..2}; do
68
- echo "pushing ${procs[${i}]}"
69
- ${procs[${i}]} &
72
+ for i in {0..1}; do
73
+ echo "pushing ${procs[${i}]}"
74
+ ${procs[${i}]} &
70
75
  pids[${i}]=$!
71
- echo "push ${procs[${i}]} is pid ${pids[${i}]}"
72
- done
76
+ echo "push ${procs[${i}]} is pid ${pids[${i}]}"
77
+ done
73
78
 
74
79
  # Wait for all pushes. "wait" will check the return code of each process also.
75
80
  for pid in ${pids[*]}; do
76
- echo "checking $pid"
77
- wait $pid
81
+ echo "checking $pid"
82
+ wait $pid
78
83
  done
79
84
 
80
85
  procs[0]="docker push -f #{registry}#{image_name}-centos7:latest"
81
86
  procs[1]="docker push -f #{registry}#{image_name}-rhel7:latest"
82
87
 
83
88
  # Run pushes in parallel
84
- for i in {0..1}; do
85
- ${procs[${i}]} &
89
+ for i in {0..1}; do
90
+ ${procs[${i}]} &
86
91
  pids[${i}]=$!
87
- done
92
+ done
88
93
 
89
94
  # Wait for all pushes. "wait" will check the return code of each process also.
90
95
  for pid in ${pids[*]}; do
91
- wait $pid
96
+ wait $pid
92
97
  done
93
98
 
94
99
  popd
@@ -99,12 +104,12 @@ set +e
99
104
  # Note that this only invokes "make test" on the image, if the tests
100
105
  # succeed the candidate produced by "make test" will be pushed. There
101
106
  # is an implicit assumption here that the image produced by make test
102
- # is identical to what would be produced by a subsequent "make build"
107
+ # is identical to what would be produced by a subsequent "make build"
103
108
  # call, so there's no point in explicitly calling "make build" after
104
109
  # "make test"
105
110
  def build_image(image_name, version, git_ref, repo_url)
106
111
  %{
107
- dest_dir="/data/src/github/openshift/#{image_name}"
112
+ dest_dir=/tmp/images/#{image_name}
108
113
  rm -rf ${dest_dir}; mkdir -p ${dest_dir}
109
114
  set -e
110
115
  pushd ${dest_dir}
@@ -112,9 +117,9 @@ git init && git remote add -t master origin #{repo_url}
112
117
  git fetch && git checkout #{git_ref}
113
118
  git_ref=$(git rev-parse --short HEAD)
114
119
  echo "Building and testing #{image_name}-centos7:$git_ref ..."
115
- make test TARGET=centos7 VERSION=#{version} TAG_ON_SUCCESS=true
120
+ sudo env "PATH=$PATH" make test TARGET=centos7 VERSION=#{version} TAG_ON_SUCCESS=true
116
121
  echo "Building and testing #{image_name}-rhel7:$git_ref ..."
117
- make test TARGET=rhel7 VERSION=#{version} TAG_ON_SUCCESS=true
122
+ sudo env "PATH=$PATH" make test TARGET=rhel7 VERSION=#{version} TAG_ON_SUCCESS=true
118
123
  popd
119
124
  set +e
120
125
  }
@@ -155,7 +160,7 @@ docker pull #{@options[:registry]}openshift/base-rhel7
155
160
 
156
161
  cmd += %{
157
162
  # so we can call sti
158
- PATH=/data/src/github.com/openshift/source-to-image/_output/go/bin:/data/src/github.com/openshift/source-to-image/_output/local/go/bin:$PATH
163
+ export PATH=/data/src/github.com/openshift/source-to-image/_output/go/bin:/data/src/github.com/openshift/source-to-image/_output/local/go/bin:$PATH
159
164
  }
160
165
 
161
166
  # FIXME: We always need to make sure we have the latest base image
@@ -32,7 +32,7 @@ module Vagrant
32
32
 
33
33
  def self.install_openshift(options)
34
34
  Vagrant::Action::Builder.new.tap do |b|
35
- b.use YumUpdate
35
+ #b.use YumUpdate
36
36
  b.use SetHostName
37
37
  b.use InstallOpenshift
38
38
  b.use InstallOpenshiftRhel7
@@ -18,7 +18,7 @@ require_relative "../action"
18
18
  module Vagrant
19
19
  module Openshift
20
20
  module Commands
21
- class OpenshiftInit < Vagrant.plugin(2, :command)
21
+ class OriginInit < Vagrant.plugin(2, :command)
22
22
  include CommandHelper
23
23
 
24
24
  def self.synopsis
@@ -31,23 +31,25 @@ module Vagrant
31
31
  :os => 'centos7',
32
32
  :stage => 'inst',
33
33
  :instance_type => 't2.medium',
34
+ :volume_size => 25,
34
35
  :port_mappings => [],
35
36
  :no_synced_folders => false,
36
37
  :no_insert_key => false
37
38
  }
38
39
 
39
40
  valid_stage = ['os','deps','inst', 'bootstrap']
40
- valid_os = ['centos7','fedora','rhel7']
41
+ valid_os = ['centos7','fedora','rhel7','rhelatomic7']
41
42
 
42
43
  opts = OptionParser.new do |o|
43
44
  o.banner = "Usage: vagrant origin-init [vm or instance name]"
44
45
  o.separator ""
45
46
 
46
- o.on("-s [stage]", "--stage [stage]", String, "Specify what build state to start from:\n\tos = base operating system\n\tdeps = only dependencies installed\n\tinst = dev environment [default]\n\tbootstrap = running environment") do |f|
47
+ o.on("-s [stage]", "
48
+ --stage [stage]", String, "Specify what build state to start from:\n\tos = base operating system\n\tdeps = only dependencies installed\n\tinst = dev environment [default]\n\tbootstrap = running environment") do |f|
47
49
  options[:stage] = f
48
50
  end
49
51
 
50
- o.on("-o [name]", "--os [name]", String, "Operating system:\n\tcentos7 [default]\n\tfedora\n\trhel7") do |f|
52
+ o.on("-o [name]", "--os [name]", String, "Operating system:\n\tcentos7 [default]\n\tfedora\n\trhel7\n\trhelatomic7") do |f|
51
53
  options[:os] = f
52
54
  end
53
55
 
@@ -66,6 +68,10 @@ module Vagrant
66
68
  o.on('--instance-type', "--instance-type [type]", String, "Specify what type of instance to launch") do |f|
67
69
  options[:instance_type] = f
68
70
  end
71
+
72
+ o.on('--volume-size', "--volume-size [size]", String, "Specify the volume size for the instance") do |f|
73
+ options[:volume_size] = f.to_i
74
+ end
69
75
  end
70
76
 
71
77
  # Parse the options
@@ -95,14 +95,15 @@ set -x
95
95
 
96
96
  # NOTE: This is only for rhel7
97
97
  if [ -n "#{registry}" -a -f /etc/sysconfig/docker ]; then
98
+ sudo chmod a+rw /etc/sysconfig/docker
98
99
  cat <<EOF > /etc/sysconfig/docker
99
100
  OPTIONS='--insecure-registry #{registry} --selinux-enabled'
100
101
  EOF
101
- systemctl restart docker
102
+ sudo systemctl restart docker
102
103
  fi
103
104
 
104
105
  # so we can call sti
105
- PATH=/data/src/github.com/openshift/source-to-image/_output/go/bin:/data/src/github.com/openshift/source-to-image/_output/local/go/bin:$PATH
106
+ export PATH=/data/src/github.com/openshift/source-to-image/_output/go/bin:/data/src/github.com/openshift/source-to-image/_output/local/go/bin:$PATH
106
107
 
107
108
  # create a temp dir to play in
108
109
  temp_dir=$(mktemp -d /tmp/image_test.XXXXXXX)
@@ -128,19 +129,19 @@ if [ "#{base_images}" == "true" -a -n "#{registry}" ]; then
128
129
  docker pull #{registry}/openshift/base-rhel7 && docker tag #{registry}/openshift/base-rhel7 openshift/base-rhel7
129
130
  fi
130
131
 
131
- if ! make test TARGET=rhel7; then
132
+ if ! sudo env "PATH=$PATH" make test TARGET=rhel7; then
132
133
  echo "ERROR: #{image}-rhel7 failed testing."
133
134
  exit 1
134
135
  fi
135
-
136
- if ! make test TARGET=centos7; then
136
+
137
+ if ! sudo env "PATH=$PATH" make test TARGET=centos7; then
137
138
  echo "ERROR: #{image}-centos7 failed testing."
138
139
  exit 1
139
140
  fi
140
141
 
141
142
  # clean up
142
143
  cd /
143
- rm -rf $temp_dir
144
+ sudo rm -rf $temp_dir
144
145
  exit $status
145
146
  })
146
147
  # Vagrant throws an exception if any execute invocation returns non-zero,
@@ -33,7 +33,7 @@ module Vagrant
33
33
  def self.openshift_images
34
34
  {
35
35
  'openshift/base' => 'https://github.com/openshift/sti-base.git',
36
- 'openshift/jenkins-16' => 'https://github.com/openshift/jenkins.git',
36
+ 'openshift/jenkins-1' => 'https://github.com/openshift/jenkins.git',
37
37
  'openshift/nodejs-010' => 'https://github.com/openshift/sti-nodejs.git',
38
38
  'openshift/openldap-2441' => 'https://github.com/openshift/openldap.git',
39
39
  'openshift/perl-516' => 'https://github.com/openshift/sti-perl.git',
@@ -48,6 +48,7 @@ module Vagrant
48
48
  'openshift/mysql-55' => 'https://github.com/openshift/mysql.git',
49
49
  'openshift/mysql-56' => 'https://github.com/openshift/mysql.git',
50
50
  'openshift/mongodb-24' => 'https://github.com/openshift/mongodb.git',
51
+ 'rhscl/mongodb-26' => 'https://github.com/openshift/mongodb.git',
51
52
  'openshift/postgresql-92' => 'https://github.com/openshift/postgresql.git',
52
53
  'openshift/wildfly-81' => 'https://github.com/openshift/sti-wildfly.git'
53
54
  }
@@ -83,8 +83,8 @@ module Vagrant
83
83
  end
84
84
 
85
85
  command "origin-init" do
86
- require_relative "command/openshift_init"
87
- Commands::OpenshiftInit
86
+ require_relative "command/origin_init"
87
+ Commands::OriginInit
88
88
  end
89
89
 
90
90
  command "openshift-local-checkout" do
@@ -176,3 +176,52 @@
176
176
  :openstack:
177
177
  :image: <RHEL 7>
178
178
  :ssh_user: root
179
+ :rhelatomic7:
180
+ :os:
181
+ :aws:
182
+ :ami: <AMI_ID>
183
+ :ami_region: us-east-1
184
+ :ssh_user: cloud-user
185
+ :machine_name: openshift-rhelatomic7
186
+ :ebs_volume_size: 25
187
+ :ami_tag_prefix: openshift-rhelatomic7_
188
+ :openstack:
189
+ :image: <ATOMIC>
190
+ :flavor: m1.small
191
+ :ssh_user: root
192
+ :deps:
193
+ :aws:
194
+ :ami: <AMI_ID>
195
+ :ami_region: us-east-1
196
+ :ssh_user: cloud-user
197
+ :machine_name: devenv-rhelatomic7-base
198
+ :ebs_volume_size: 25
199
+ :ami_tag_prefix: devenv-rhelatomic7-base_
200
+ :openstack:
201
+ :image: <ATOMIC>
202
+ :flavor: m1.small
203
+ :ssh_user: root
204
+ :inst:
205
+ :aws:
206
+ :ami: <AMI_ID>
207
+ :ami_region: us-east-1
208
+ :ssh_user: cloud-user
209
+ :machine_name: <AMI_NAME>
210
+ :ebs_volume_size: 25
211
+ :ami_tag_prefix: openshift-rhelatomic7_
212
+ :openstack:
213
+ :image: <ATOMIC>
214
+ :flavor: m1.small
215
+ :ssh_user: root
216
+ :bootstrap:
217
+ :aws:
218
+ :ami: <AMI_ID>
219
+ :ami_region: us-east-1
220
+ :ssh_user: cloud-user
221
+ :machine_name: <AMI_NAME>
222
+ :ebs_volume_size: 25
223
+ :ami_tag_prefix: devenv-rhelatomic7-bootstrap_
224
+ :openstack:
225
+ :image: <ATOMIC>
226
+ :flavor: m1.small
227
+ :ssh_user: root
@@ -16,6 +16,6 @@
16
16
 
17
17
  module Vagrant
18
18
  module Openshift
19
- VERSION = "2.0.6"
19
+ VERSION = "2.0.7"
20
20
  end
21
21
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-openshift
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.6
4
+ version: 2.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Red Hat
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-26 00:00:00.000000000 Z
11
+ date: 2015-09-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -167,7 +167,7 @@ files:
167
167
  - lib/vagrant-openshift/command/local_openshift_setup.rb
168
168
  - lib/vagrant-openshift/command/modify_ami.rb
169
169
  - lib/vagrant-openshift/command/modify_instance.rb
170
- - lib/vagrant-openshift/command/openshift_init.rb
170
+ - lib/vagrant-openshift/command/origin_init.rb
171
171
  - lib/vagrant-openshift/command/push_openshift_images.rb
172
172
  - lib/vagrant-openshift/command/push_openshift_release.rb
173
173
  - lib/vagrant-openshift/command/repo_sync_openshift.rb