diff options
-rw-r--r-- | lib/leap_cli/commands/ca.rb | 6 | ||||
-rw-r--r-- | provider_base/services/mx.json | 2 | ||||
-rw-r--r-- | puppet/modules/leap/manifests/cli/install.pp | 16 | ||||
-rw-r--r-- | puppet/modules/site_couchdb/manifests/create_dbs.pp | 11 | ||||
-rwxr-xr-x | tests/example-provider/vagrant/configure-leap.sh | 7 | ||||
-rwxr-xr-x | tests/example-provider/vagrant/install-platform.pp | 3 | ||||
-rw-r--r-- | tests/example-provider/vagrant/vagrant.config | 2 |
7 files changed, 24 insertions, 23 deletions
diff --git a/lib/leap_cli/commands/ca.rb b/lib/leap_cli/commands/ca.rb index 3c5fc7d5..1c67ae67 100644 --- a/lib/leap_cli/commands/ca.rb +++ b/lib/leap_cli/commands/ca.rb @@ -281,11 +281,13 @@ module LeapCli; module Commands if status == 'valid' log 'authorized!', color: :green, style: :bold elsif status == 'error' - bail! :error, message + bail! :error, message.inspect elsif status == 'unauthorized' - bail!(:unauthorized, message, color: :yellow, style: :bold) do + bail!(:unauthorized, message.inspect, color: :yellow, style: :bold) do log 'You must first run `leap cert register` to register the account key with letsencrypt.org' end + else + bail!(:error, "unrecognized status: #{status.inspect}, #{message.inspect}") end log :fetching, "new certificate from letsencrypt.org" diff --git a/provider_base/services/mx.json b/provider_base/services/mx.json index c7e99d85..2db773b5 100644 --- a/provider_base/services/mx.json +++ b/provider_base/services/mx.json @@ -37,7 +37,7 @@ }, "x509": { "use": true, - "use_commercial": true, + "use_commercial": false, "ca_cert": "= file :ca_cert, :missing => 'provider CA. Run `leap cert ca`'", "client_ca_cert": "= file :client_ca_cert, :missing => 'Certificate Authority. Run `leap cert ca`'", "client_ca_key": "= file :client_ca_key, :missing => 'Certificate Authority. Run `leap cert ca`'" diff --git a/puppet/modules/leap/manifests/cli/install.pp b/puppet/modules/leap/manifests/cli/install.pp index 25e87033..d009316b 100644 --- a/puppet/modules/leap/manifests/cli/install.pp +++ b/puppet/modules/leap/manifests/cli/install.pp @@ -1,13 +1,20 @@ # installs leap_cli on node class leap::cli::install ( $source = false ) { + + # nokogiri is a dependency gem of leap_cli and + # needs build tools in order to get compiled + ensure_packages (['gcc', 'make', 'zlib1g-dev']) + class { '::ruby': + install_dev => true, + require => [ Package['gcc'], Package['make'], Package['zlib1g-dev'] ] + } + + if $source { # needed for building leap_cli from source include ::git include ::rubygems - class { '::ruby': - install_dev => true - } class { 'bundler::install': install_method => 'package' } @@ -40,7 +47,8 @@ class leap::cli::install ( $source = false ) { else { package { 'leap_cli': ensure => installed, - provider => gem + provider => gem, + require => Class['ruby'] } } } diff --git a/puppet/modules/site_couchdb/manifests/create_dbs.pp b/puppet/modules/site_couchdb/manifests/create_dbs.pp index ddfb7d65..1c594bb6 100644 --- a/puppet/modules/site_couchdb/manifests/create_dbs.pp +++ b/puppet/modules/site_couchdb/manifests/create_dbs.pp @@ -1,5 +1,6 @@ # creates neccesary databases class site_couchdb::create_dbs { + $services = hiera('services', []) Class['site_couchdb::setup'] -> Class['site_couchdb::create_dbs'] @@ -42,10 +43,12 @@ class site_couchdb::create_dbs { ## shared database ## r/w: soledad - couchdb::create_db { 'shared': - members => "{ \"names\": [\"${site_couchdb::couchdb_soledad_user}\"], \"roles\": [\"replication\"] }", - require => Couchdb::Query::Setup['localhost'], - notify => Service['soledad-server']; + if member($services, 'soledad') { + couchdb::create_db { 'shared': + members => "{ \"names\": [\"${site_couchdb::couchdb_soledad_user}\"], \"roles\": [\"replication\"] }", + require => Couchdb::Query::Setup['localhost'], + notify => Service['soledad-server']; + } } ## tickets database diff --git a/tests/example-provider/vagrant/configure-leap.sh b/tests/example-provider/vagrant/configure-leap.sh index fd34d7ea..8bd591e0 100755 --- a/tests/example-provider/vagrant/configure-leap.sh +++ b/tests/example-provider/vagrant/configure-leap.sh @@ -35,10 +35,6 @@ echo '{ "webapp": { "admins": ["testadmin"] } }' > services/webapp.json $LEAP $OPTS compile -$GIT init -$GIT add . -$GIT commit -m'configured provider' - $LEAP $OPTS node init $NODE if [ $? -eq 1 ]; then echo 'node init failed' @@ -52,9 +48,6 @@ gem install rake $LEAP $OPTS -v 2 deploy -$GIT add . -$GIT commit -m'initialized and deployed provider' - # Vagrant: leap_mx fails to start on jessie # https://leap.se/code/issues/7755 # Workaround: we stop and start leap-mx after deploy and diff --git a/tests/example-provider/vagrant/install-platform.pp b/tests/example-provider/vagrant/install-platform.pp index 223853c1..9cefcf7c 100755 --- a/tests/example-provider/vagrant/install-platform.pp +++ b/tests/example-provider/vagrant/install-platform.pp @@ -10,6 +10,3 @@ class { '::leap::cli::install': file { [ '/srv/leap', '/srv/leap/configuration', '/var/log/leap' ]: ensure => directory } - -# install prerequisites for configuring the provider -include ::git diff --git a/tests/example-provider/vagrant/vagrant.config b/tests/example-provider/vagrant/vagrant.config index 60d2a52c..ff5dd38f 100644 --- a/tests/example-provider/vagrant/vagrant.config +++ b/tests/example-provider/vagrant/vagrant.config @@ -19,5 +19,3 @@ SUDO="sudo -u ${USER}" PROVIDERDIR="/home/${USER}/leap/configuration" PLATFORMDIR="/srv/leap_platform" LEAP="$SUDO /usr/local/bin/leap" -GIT="$SUDO git" - |