Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions dev/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ Requirements:

First, add the following configuration to your `/etc/hosts` file:

192.168.33.100 api.chef-server.dev manage.chef-server.dev
192.168.33.150 database.chef-server.dev
192.168.33.151 backend.chef-server.dev
192.168.33.152 ldap.chef-server.dev
192.168.33.153 custom.chef-server.dev
192.168.33.155 reportingdb.chef-server.dev
192.168.33.156 elasticsearch.chef-server.dev
192.168.33.157 solr.chef-server.dev
192.168.56.100 api.chef-server.dev manage.chef-server.dev
192.168.56.150 database.chef-server.dev
192.168.56.151 backend.chef-server.dev
192.168.56.152 ldap.chef-server.dev
192.168.56.153 custom.chef-server.dev
192.168.56.155 reportingdb.chef-server.dev
192.168.56.156 elasticsearch.chef-server.dev
192.168.56.157 solr.chef-server.dev

Next, bring up the VMs!

Expand Down Expand Up @@ -126,7 +126,7 @@ Ruby project dependency loading support coming soon.
### Installing Chef Server Plugins

If you wish to install Chef Server plugins with pre-downloaded or pre-built
binaries, set the corresponding attribute in your `config.yml` to true.
binaries, set the corresponding attribute in your `config.yml` to true.
The corresponding package needs to be either in `~/Downloads`, `../omnibus/pkg`,
or you can set an environment variable with the path to the package.

Expand Down Expand Up @@ -330,7 +330,7 @@ vm:
start: true
use-external: true
```
# Using elasticsearch
# Using elasticsearch

To create a separate elasticsearch vm create a `config.yml` file with the following contents:
```
Expand All @@ -339,7 +339,7 @@ To create a separate elasticsearch vm create a `config.yml` file with the follow
# The major version family to use - either "2" or "5".
version: "5"
```
# Using external solr
# Using external solr

To create a separate solr vm create a `config.yml` file with the following contents:
```
Expand Down
21 changes: 10 additions & 11 deletions dev/Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@ require "fileutils"
load "dvmtools.rb"

Variant = ENV['VAGRANT_MACHINE_VARIANT'] ? ("-" + ENV['VAGRANT_MACHINE_VARIANT'] ) : ''
VMName = "chef-server#{Variant}"
VMName = "chef-server#{Variant}"

IPS = {
cs: "192.168.33.100",
db: "192.168.33.150",
be: "192.168.33.151",
ldap: "192.168.33.152",
custom: "192.168.33.153",
reportingdb: "192.168.33.155",
elasticsearch: "192.168.33.156",
solr: "192.168.33.157"
cs: "192.168.56.100",
db: "192.168.56.150",
be: "192.168.56.151",
ldap: "192.168.56.152",
custom: "192.168.56.153",
reportingdb: "192.168.56.155",
elasticsearch: "192.168.56.156",
solr: "192.168.56.157"
}

# to run a chef-server vm with external postgresql,
Expand Down Expand Up @@ -56,7 +56,6 @@ end

Vagrant.configure("2") do |config|
attributes = load_settings
config.omnibus.chef_version = :latest
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'omnibus' is not a supported attr of config anymore. This has no functional effect on dev vm, because we provision using the chef client included in chef server.

config.vm.network 'public_network' if USE_AZURE
# Use the official Ubuntu 18.04 box
# Vagrant will auto resolve the url to download from Atlas
Expand Down Expand Up @@ -171,7 +170,7 @@ def define_chef_server(config, attributes)
"opscode_erchef['db_pool_size']" => 10,
"oc_id['db_pool_size']" => 10,
"oc_bifrost['db_pool_size']" => 10 }

pg.merge!({
"postgresql['db_connection_superuser']" => "'#{DB_SUPERUSER}@#{IPS[:db]}'",
"postgresql['sql_connection_user']" => "'#{DB_SUPERUSER}@#{IPS[:db]}'",
Expand Down
2 changes: 1 addition & 1 deletion dev/config.yml.example
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ vm:
# and tcp-based access.
#chef-server-config:
# postgresql['external']: true
# postgresql['vip']: "\"192.168.33.1\""
# postgresql['vip']: "\"192.168.56.1\""
# postgresql['port']: 5432
# postgresql['db_superuser']: "\"bob\""
# postgresql['db_superuser_password']: "\"i like bob\""
Expand Down
2 changes: 1 addition & 1 deletion dev/cookbooks/provisioning/templates/default/hosts.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
127.0.0.1 localhost
<% @fqdns.each do |fqdn| %>
192.168.33.100 <%=fqdn.split(".")[0]%> <%=fqdn%>
192.168.56.100 <%=fqdn.split(".")[0]%> <%=fqdn%>
<% end %>

<% @global_fqdns.each do |entry| %>
Expand Down
4 changes: 2 additions & 2 deletions dev/scripts/provision-postgres.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#
#CS_IP=
# Chef Infra Server IP address
# default: '192.168.33.100'
# default: '192.168.56.100'
#
#PG_MAJOR=
# PostgreSQL major version
Expand Down Expand Up @@ -54,7 +54,7 @@
#### Set default values (if not overridden by environment variables)
#

test -n "${CS_IP}" || CS_IP=${1:-'192.168.33.100'} # Allow old $1 parameter
test -n "${CS_IP}" || CS_IP=${1:-'192.168.56.100'} # Allow old $1 parameter
test -n "${PG_MAJOR}" || PG_MAJOR=13
test -n "${PG_MINOR}" || PG_MINOR='latest'
test -n "${PG_HBA_AUTH}" || PG_HBA_AUTH='md5'
Expand Down
4 changes: 2 additions & 2 deletions dev/scripts/reporting/reporting-dvm-preflight.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@ fi
echo "postgresql['db_superuser'] = \"bofh\"" > /tmp/external-postgres-1.rb
echo "postgresql['db_superuser_password'] = \"i1uvd3v0ps\"" >> /tmp/external-postgres-1.rb
echo "postgresql['external'] = true" >> /tmp/external-postgres-1.rb
echo "postgresql['vip'] = \"192.168.33.150\"" >> /tmp/external-postgres-1.rb
echo "postgresql['vip'] = \"192.168.56.150\"" >> /tmp/external-postgres-1.rb

# External Server Config 2)

echo "postgresql['db_superuser'] = \"bofh\"" > /tmp/external-postgres-2.rb
echo "postgresql['db_superuser_password'] = \"i1uvd3v0ps\"" >> /tmp/external-postgres-2.rb
echo "postgresql['external'] = true" >> /tmp/external-postgres-2.rb
echo "postgresql['vip'] = \"192.168.33.155\"" >> /tmp/external-postgres-2.rb
echo "postgresql['vip'] = \"192.168.56.155\"" >> /tmp/external-postgres-2.rb
4 changes: 2 additions & 2 deletions dev/scripts/reporting/reporting-preflight.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@ fi
echo "postgresql['db_superuser'] = \"bofh\"" > /tmp/external-postgres-1.rb
echo "postgresql['db_superuser_password'] = \"i1uvd3v0ps\"" >> /tmp/external-postgres-1.rb
echo "postgresql['external'] = true" >> /tmp/external-postgres-1.rb
echo "postgresql['vip'] = \"192.168.33.150\"" >> /tmp/external-postgres-1.rb
echo "postgresql['vip'] = \"192.168.56.150\"" >> /tmp/external-postgres-1.rb

# External Server Config 2)

echo "postgresql['db_superuser'] = \"bofh\"" > /tmp/external-postgres-2.rb
echo "postgresql['db_superuser_password'] = \"i1uvd3v0ps\"" >> /tmp/external-postgres-2.rb
echo "postgresql['external'] = true" >> /tmp/external-postgres-2.rb
echo "postgresql['vip'] = \"192.168.33.155\"" >> /tmp/external-postgres-2.rb
echo "postgresql['vip'] = \"192.168.56.155\"" >> /tmp/external-postgres-2.rb