dev-lxc 2.1.0 → 2.2.0

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: f871a43dea58908ab84c21ed956c63585749b86c
4
- data.tar.gz: 106896247fff4158856d8b7e7b68d855b53f856b
3
+ metadata.gz: 325efef6d895b0c1a50eda5b5fa7a83288036324
4
+ data.tar.gz: b21fa16693ab0f68a9b3588c40e809f26b09da95
5
5
  SHA512:
6
- metadata.gz: 06f0045440c5d62985634e90dec1b55cf693afb51e9a3c6ed2320dd0d553d85dfdb4973e11cdaab392ba53f2acc89e334fe48cb5430eaaa32204a38b82a29eb2
7
- data.tar.gz: 0474c7ad48397b3015cb5086260c587006d9aed88ea9abe3ee1f6bf0d5063ceceb168f268880ccf02cbdd0e51741fe1908b51b8de1d8a935d86d3d0045b25d1e
6
+ metadata.gz: b32a36d756fa23c7cead5c03891212da4864a1e9a8d42bab010b2b3c46bb792a02eed10e8152de47c23a9eb8069d9f7be381ca003cf54b92321391dd78493e25
7
+ data.tar.gz: 4bdb524fc69e72c06ca10ef0c1ae63717ea845986370803a6e7cda55f74732aae65ca9f187b05f1811ab24d73f0cd84b9d014ed1054519a8c651120efe541631
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # dev-lxc Change Log
2
2
 
3
+ ## 2.2.0 (2016-07-20)
4
+
5
+ * Make build nodes reregister to Chef Server
6
+ * Make build nodes sleep 5s for DNS resolution availability
7
+ * Allow build-nodes to use different base_containers than Chef Automate's
8
+ * Change default mount point from dev to work
9
+
3
10
  ## 2.1.0 (2016-07-19)
4
11
 
5
12
  * Provide ability to define Chef org for node's chef-client config
data/README.md CHANGED
@@ -114,7 +114,7 @@ Create the [dev-lxc.yml config file](docs/configuration.md) for the cluster.
114
114
  First, create an arbitrary directory to hold the dev-lxc.yml file.
115
115
 
116
116
  ```
117
- mkdir -p /root/dev/clusters/automate
117
+ mkdir -p /root/work/clusters/automate
118
118
  ```
119
119
 
120
120
  Then use the `init` subcommand to generate a sample configuration using the available options. Run `dl help init` to see what options are available.
@@ -122,13 +122,13 @@ Then use the `init` subcommand to generate a sample configuration using the avai
122
122
  The following command configures a standalone Chef Server, a Chef Automate server and a build node.
123
123
 
124
124
  ```
125
- dl init --chef --automate --build-nodes -f /root/dev/clusters/automate/dev-lxc.yml
125
+ dl init --chef --automate --build-nodes -f /root/work/clusters/automate/dev-lxc.yml
126
126
  ```
127
127
 
128
128
  We can easily append additional configurations to this file. For example, the following command appends an infrastructure node.
129
129
 
130
130
  ```
131
- dl init --nodes -a -f /root/dev/clusters/automate/dev-lxc.yml
131
+ dl init --nodes -a -f /root/work/clusters/automate/dev-lxc.yml
132
132
  ```
133
133
 
134
134
  Edit the dev-lxc.yml file:
@@ -150,10 +150,10 @@ The right pane updates every 0.5 seconds with the cluster's status provided by `
150
150
  The session's second window is named "shell". It opens in the same directory as the
151
151
  cluster's `dev-lxc.yml` file and is useful for attaching to a server to perform system administration tasks.
152
152
 
153
- See the [Usage docs](docs/usage.md) for more information about how to close/kill Byobu sessions.
153
+ See the [usage docs](docs/usage.md) for more information about how to close/kill Byobu sessions.
154
154
 
155
155
  ```
156
- cluster-view /root/dev/clusters/automate
156
+ cluster-view /root/work/clusters/automate
157
157
  ```
158
158
 
159
159
  #### Specifying a Subset of Servers
@@ -13,8 +13,8 @@ The number of servers, their names and their IP addresses can be changed to fit
13
13
  particular requirements.
14
14
 
15
15
  ```
16
- mkdir -p /root/dev/clusters/delivery
17
- cd /root/dev/clusters/delivery
16
+ mkdir -p /root/work/clusters/delivery
17
+ cd /root/work/clusters/delivery
18
18
  dev-lxc init --adhoc > dev-lxc.yml
19
19
  # edit dev-lxc.yml to have enough adhoc servers for a delivery cluster
20
20
  cluster-view
@@ -19,11 +19,11 @@ base_container: b-ubuntu-1404
19
19
 
20
20
  # list any host directories you want mounted into the servers
21
21
  #mounts:
22
- # - /root/dev root/dev
22
+ # - /root/work root/work
23
23
 
24
24
  # list any SSH public keys you want added to /home/dev-lxc/.ssh/authorized_keys
25
25
  #ssh-keys:
26
- # - /root/dev/clusters/id_rsa.pub
26
+ # - /root/work/clusters/id_rsa.pub
27
27
 
28
28
  # DHCP reserved (static) IPs must be selected from the IP range 10.0.3.150 - 254
29
29
 
@@ -59,7 +59,6 @@ automate:
59
59
  ipaddress: 10.0.3.200
60
60
  products:
61
61
  delivery:
62
- chefdk: # downloaded only for build nodes
63
62
  license_path: /CHANGE/ME
64
63
  chef_org: delivery
65
64
  enterprise_name: demo-ent
@@ -67,6 +66,8 @@ automate:
67
66
  build-nodes:
68
67
  servers:
69
68
  build-node-1.lxc:
69
+ products:
70
+ chefdk: # downloaded only
70
71
 
71
72
  nodes:
72
73
  chef_server_url: https://chef.lxc/organizations/demo
data/lib/dev-lxc/cli.rb CHANGED
@@ -63,11 +63,11 @@ base_container: b-ubuntu-1404
63
63
 
64
64
  # list any host directories you want mounted into the servers
65
65
  #mounts:
66
- # - /root/dev root/dev
66
+ # - /root/work root/work
67
67
 
68
68
  # list any SSH public keys you want added to /home/dev-lxc/.ssh/authorized_keys
69
69
  #ssh-keys:
70
- # - /root/dev/clusters/id_rsa.pub
70
+ # - /root/work/clusters/id_rsa.pub
71
71
 
72
72
  # DHCP reserved (static) IPs must be selected from the IP range 10.0.3.150 - 254
73
73
  )
@@ -129,7 +129,6 @@ automate:
129
129
  ipaddress: 10.0.3.200
130
130
  products:
131
131
  delivery:
132
- chefdk: # downloaded only for build nodes
133
132
  license_path: /CHANGE/ME
134
133
  chef_org: delivery
135
134
  enterprise_name: demo-ent
@@ -138,6 +137,8 @@ automate:
138
137
  build-nodes:
139
138
  servers:
140
139
  build-node-1.lxc:
140
+ products:
141
+ chefdk: # downloaded only
141
142
  )
142
143
  analytics_config = %Q(
143
144
  analytics:
@@ -394,6 +394,8 @@ module DevLXC
394
394
  end
395
395
  servers = get_sorted_servers(server_name_regex)
396
396
  servers.each do |server|
397
+ # if this is a build node and it only has one product (chefdk) then skip the install
398
+ next if @server_configs[server.name][:server_type] == "build-nodes" && @server_configs[server.name][:required_products].length == 1
397
399
  install_products(server) unless @server_configs[server.name][:required_products].empty?
398
400
  end
399
401
  servers.each do |server|
@@ -531,11 +533,8 @@ module DevLXC
531
533
  server.start
532
534
  end
533
535
  @server_configs[server.name][:required_products].each do |product_name, package_source|
534
- if @server_configs[server.name][:server_type] == "automate" && product_name == "chefdk"
535
- IO.write("#{server.container.config_item('lxc.rootfs')}/root/build_node_chefdk_package_path", "#{package_source}\n")
536
- else
537
- server.install_package(package_source)
538
- end
536
+ next if @server_configs[server.name][:server_type] == "build-nodes" && product_name == "chefdk"
537
+ server.install_package(package_source)
539
538
  end
540
539
  server.stop
541
540
  server.snapshot("dev-lxc build: products installed")
@@ -556,6 +555,7 @@ module DevLXC
556
555
  when 'analytics'
557
556
  configure_analytics(server) if required_products.include?('analytics')
558
557
  when 'build-nodes'
558
+ sleep 5 # give time for DNS resolution to be available
559
559
  configure_build_node(server)
560
560
  when 'chef-backend'
561
561
  configure_chef_backend(server) if required_products.include?('chef-backend')
@@ -642,15 +642,13 @@ module DevLXC
642
642
  automate_server_name = @server_configs.select {|name, config| config[:server_type] == 'automate'}.keys.first
643
643
  if automate_server_name
644
644
  automate_server = get_server(automate_server_name)
645
- if File.exist?("#{automate_server.container.config_item('lxc.rootfs')}/root/build_node_chefdk_package_path")
646
- build_node_chefdk_package_path = IO.read("#{automate_server.container.config_item('lxc.rootfs')}/root/build_node_chefdk_package_path").chomp
647
- install_build_node_cmd = "install-build-node"
648
- install_build_node_cmd += " --fqdn #{server.name}"
649
- install_build_node_cmd += " --username dev-lxc"
650
- install_build_node_cmd += " --password dev-lxc"
651
- install_build_node_cmd += " --installer #{build_node_chefdk_package_path}"
652
- run_ctl(automate_server, "delivery", install_build_node_cmd)
653
- end
645
+ install_build_node_cmd = "install-build-node"
646
+ install_build_node_cmd += " --fqdn #{server.name}"
647
+ install_build_node_cmd += " --username dev-lxc"
648
+ install_build_node_cmd += " --password dev-lxc"
649
+ install_build_node_cmd += " --installer #{@server_configs[server.name][:required_products]["chefdk"]}"
650
+ install_build_node_cmd += " --overwrite-registration"
651
+ run_ctl(automate_server, "delivery", install_build_node_cmd)
654
652
  end
655
653
  end
656
654
 
@@ -1,3 +1,3 @@
1
1
  module DevLXC
2
- VERSION = "2.1.0"
2
+ VERSION = "2.2.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dev-lxc
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeremiah Snapp
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-07-19 00:00:00.000000000 Z
11
+ date: 2016-07-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler