diff --git a/README.md b/README.md index 985f9fe..a65c254 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,19 @@ # LiDOP A easy to use DevOps playground. Can be started local or in AWS. +## TL;DR + +Open "git bash" (or any linux terminal) and do: + +``` +git clone https://github.com/LivingDevOps/LiDOP.git +cd LiDOP +vagrant up +``` +Then got to https://www.10.20.30.40.nip.io to find all the tools. + +There is also terraform code to make it run in AWS (or Azure/GCP), but there is much more preparation and debugging needed for that. + ## Build Status | Build | Status diff --git a/Vagrantfile b/Vagrantfile index b680583..b05976e 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -66,7 +66,10 @@ Vagrant.configure("2") do |config| -e HOST=$IPADDRESS \ -e HOSTNAME=$HOSTNAME \ -e TEST_HOST=$TEST_HOST \ - registry.service.lidop.local:5000/lidop/serverspec:#{configuration["docker_image_version"]} test + registry.service.lidop.local:5000/lidop/serverspec:#{configuration["docker_image_version"]} test || true + # registry does not contain that image... + echo "existing images:" + curl -ks https://registry.service.lidop.local:5000/v2/_catalog SCRIPT # no parallel start of the machines @@ -96,4 +99,4 @@ Vagrant.configure("2") do |config| end end end -end \ No newline at end of file +end diff --git a/install/roles/consul/tasks/01_consul.yml b/install/roles/consul/tasks/01_consul.yml index 3d0860f..81ef9c3 100644 --- a/install/roles/consul/tasks/01_consul.yml +++ b/install/roles/consul/tasks/01_consul.yml @@ -98,7 +98,6 @@ { "Name": "dns", "Description": "grant access to use dns", - "Type": "client", "Rules": "node_prefix \"\" { policy = \"read\" } service_prefix \"\" { policy = \"read\" }" } when: node == "master" @@ -116,7 +115,6 @@ { "Name": "kv", "Description": "grant access to use kv", - "Type": "client", "Rules": "key_prefix \"\" { policy = \"read\" } key_prefix \"lidop\" { policy = \"deny\" }" } when: node == "master" @@ -144,4 +142,4 @@ retries: 100 delay: 5 - tags: consul \ No newline at end of file + tags: consul diff --git a/vagrant/Vagrantfile.LocalCommand.rb b/vagrant/Vagrantfile.LocalCommand.rb index 0936bf4..70d163f 100644 --- a/vagrant/Vagrantfile.LocalCommand.rb +++ b/vagrant/Vagrantfile.LocalCommand.rb @@ -19,18 +19,18 @@ class Plugin < Vagrant.plugin("2") class Provisioner < Vagrant.plugin("2", :provisioner) def provision - base_url, s1 = Open3.capture2 "vagrant ssh lidop_0 -c 'echo $(curl --silent --header \"X-Consul-Token: $(cat ./var/lidop.secret)\" consul.service.lidop.local:8500/v1/kv/lidop/base_url?raw)'" - secret_password, s2 = Open3.capture2 "vagrant ssh lidop_0 -c 'echo $(curl --silent --header \"X-Consul-Token: $(cat ./var/lidop.secret)\" consul.service.lidop.local:8500/v1/kv/lidop/secret_password?raw)'" - root_user, s2 = Open3.capture2 "vagrant ssh lidop_0 -c 'echo $(curl --silent --header \"X-Consul-Token: $(cat ./var/lidop.secret)\" consul.service.lidop.local:8500/v1/kv/lidop/root_user?raw)'" + base_url, s1 = Open3.capture2 "vagrant ssh lidop_0 -c 'curl --silent --header \\\"X-Consul-Token: $(cat /var/lidop/.secret)\\\" consul.service.lidop.local:8500/v1/kv/lidop/base_url?raw'" + secret_password, s2 = Open3.capture2 "vagrant ssh lidop_0 -c 'curl --silent --header \\\"X-Consul-Token: $(cat /var/lidop/.secret)\\\" consul.service.lidop.local:8500/v1/kv/lidop/secret_password?raw'" + root_user, s2 = Open3.capture2 "vagrant ssh lidop_0 -c 'curl --silent --header \\\"X-Consul-Token: $(cat /var/lidop/.secret)\\\" consul.service.lidop.local:8500/v1/kv/lidop/root_user?raw'" print("\n#############################################################\n" \ - "LiDOP ist ready to use. \n" \ + "LiDOP ist ready to use.\n" \ "#############################################################\n" \ - "Access under: #{base_url}" \ - "User: #{root_user}" \ + "Access under: #{base_url}\n" \ + "User: #{root_user}\n" \ "Password: the Password you entered on startup\n" \ - "Secret Password: #{secret_password}" \ + "Secret Password: #{secret_password}\n" \ "#############################################################\n" ) end end -end \ No newline at end of file +end diff --git a/vagrant/Vagrantfile.Settings.rb b/vagrant/Vagrantfile.Settings.rb index c6c65df..74f431d 100644 --- a/vagrant/Vagrantfile.Settings.rb +++ b/vagrant/Vagrantfile.Settings.rb @@ -27,17 +27,9 @@ def init() @password = ENV["PASSWORD"] else print "Enter Password: [lidop]: " - @password = STDIN.noecho(&:gets).chomp + @password = STDIN.gets.chomp print "\n" - print "Reenter Password: [lidop]: " - @password2 = STDIN.noecho(&:gets).chomp - print "\n" - - if(@password != @password2) - raise 'Passwords are not same!!!!' - end - if(@password == "") @password = "lidop" end