Merge pull request #87 from lexsys27/local-deployment-environment
Local deployment environment
This commit is contained in:
commit
7971871d37
|
@ -8,3 +8,6 @@ group_vars/netstat
|
|||
group_vars/moc
|
||||
|
||||
hosts
|
||||
|
||||
.vagrant/*
|
||||
ubuntu-xenial-16.04-cloudimg-console.log
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
clean:
|
||||
@vagrant destroy --force
|
||||
|
||||
test:
|
||||
for i in "validator" "explorer" "moc" "bootnode" "netstat"; do \
|
||||
echo "Verifying $$i..\n"; \
|
||||
vagrant up $$i; \
|
||||
vagrant destroy --force $$i; \
|
||||
echo "Done $$i verification\n"; \
|
||||
done
|
|
@ -0,0 +1,44 @@
|
|||
|
||||
ENV["LC_ALL"] = "en_US.UTF-8"
|
||||
|
||||
Vagrant.configure("2") do |config|
|
||||
|
||||
servers = [ "validator", "explorer", "moc", "bootnode", "netstat" ]
|
||||
|
||||
if ENV["poa_platform"] == "ubuntu"
|
||||
platform = "ubuntu/xenial64"
|
||||
elsif ENV["poa_platform"] == "centos"
|
||||
platform = "centos/7"
|
||||
else
|
||||
platform = "ubuntu/xenial64"
|
||||
end
|
||||
|
||||
servers.each do |machine|
|
||||
config.vm.define machine do |node|
|
||||
node.vm.box = platform
|
||||
node.vm.hostname = machine
|
||||
|
||||
node.vm.provision :ansible do |ansible|
|
||||
ansible.playbook = "site.yml"
|
||||
ansible.groups = {
|
||||
"validator" => ["validator"],
|
||||
"explorer" => ["explorer"],
|
||||
"netstat" => ["netstat"],
|
||||
"moc" => ["moc"],
|
||||
"bootnode" => ["bootnode"]
|
||||
}
|
||||
end
|
||||
|
||||
node.vm.provision :shell do |shell|
|
||||
shell.path = "./tests/#{machine}.sh"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
config.vm.provider "virtualbox" do |vb|
|
||||
vb.memory = 1024
|
||||
vb.cpus = 1
|
||||
vb.linked_clone = true
|
||||
end
|
||||
|
||||
end
|
|
@ -0,0 +1,3 @@
|
|||
#!/bin/sh
|
||||
|
||||
echo "This is a stub for bootnode integration tests"
|
|
@ -0,0 +1,3 @@
|
|||
#!/bin/sh
|
||||
|
||||
echo "This is a stub for explorer integration tests"
|
|
@ -0,0 +1,3 @@
|
|||
#!/bin/sh
|
||||
|
||||
echo "This is a stub for moc integration tests"
|
|
@ -0,0 +1,3 @@
|
|||
#!/bin/sh
|
||||
|
||||
echo "This is a stub for netstat integration tests"
|
|
@ -0,0 +1,3 @@
|
|||
#!/bin/sh
|
||||
|
||||
echo "This is a stub for validator integration tests"
|
Loading…
Reference in New Issue