Merge pull request #87 from lexsys27/local-deployment-environment

Local deployment environment
This commit is contained in:
phahulin 2018-03-15 17:45:25 +03:00 committed by GitHub
commit 7971871d37
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 72 additions and 0 deletions

3
.gitignore vendored
View File

@ -8,3 +8,6 @@ group_vars/netstat
group_vars/moc
hosts
.vagrant/*
ubuntu-xenial-16.04-cloudimg-console.log

10
Makefile Normal file
View File

@ -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

44
Vagrantfile vendored Normal file
View File

@ -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

3
tests/bootnode.sh Normal file
View File

@ -0,0 +1,3 @@
#!/bin/sh
echo "This is a stub for bootnode integration tests"

3
tests/explorer.sh Normal file
View File

@ -0,0 +1,3 @@
#!/bin/sh
echo "This is a stub for explorer integration tests"

3
tests/moc.sh Normal file
View File

@ -0,0 +1,3 @@
#!/bin/sh
echo "This is a stub for moc integration tests"

3
tests/netstat.sh Normal file
View File

@ -0,0 +1,3 @@
#!/bin/sh
echo "This is a stub for netstat integration tests"

3
tests/validator.sh Normal file
View File

@ -0,0 +1,3 @@
#!/bin/sh
echo "This is a stub for validator integration tests"