Skip to content
Open
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
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
7 changes: 5 additions & 2 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -96,4 +99,4 @@ Vagrant.configure("2") do |config|
end
end
end
end
end
4 changes: 1 addition & 3 deletions install/roles/consul/tasks/01_consul.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand Down Expand Up @@ -144,4 +142,4 @@
retries: 100
delay: 5

tags: consul
tags: consul
16 changes: 8 additions & 8 deletions vagrant/Vagrantfile.LocalCommand.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
end
10 changes: 1 addition & 9 deletions vagrant/Vagrantfile.Settings.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down