Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
temporarily removed consul functionality, added devops vagrant setup
- Loading branch information
Showing
10 changed files
with
176 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,4 @@ run | |
doc/style.css | ||
doc/index.html | ||
zlibs/zuper-dev | ||
.vagrant |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
Vagrant.configure(2) do |config| | ||
config.vm.box = "http://vagrant.devuan.org/devuan-jessie-amd64-alpha2.box" | ||
config.ssh.username = "root" | ||
config.ssh.password = "devuan" | ||
config.vm.guest = :debian | ||
config.vm.synced_folder ".", "/vagrant", disabled: true | ||
config.vm.network :public_network | ||
|
||
config.vm.define "leader", primary: true do |leader| | ||
leader.vm.network "private_network", ip: "192.168.0.254", auto_config: false | ||
leader.vm.provision "ansible" do |ansible| | ||
ansible.playbook = "dowse.yml" | ||
ansible.sudo = true | ||
end | ||
end | ||
|
||
config.vm.define "client" do |client| | ||
client.vm.network "private_network", ip: "192.168.0.101", auto_config: false | ||
client.vm.provision :shell, inline: 'route del default gw 10.0.2.2 && dhclient -v eth1' | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
--- | ||
- name: Build a Dowse machine | ||
|
||
hosts: leader | ||
remote_user: root | ||
|
||
tasks: | ||
|
||
- name: Running update on pkg repositories | ||
apt: update_cache=yes | ||
run_once: true | ||
|
||
- name: Installing Dowse dependencies | ||
apt: name={{ item }} state=latest force=yes | ||
with_items: | ||
- daemontools | ||
- iptables | ||
- ebtables | ||
- gettext-base | ||
- procps | ||
- net-tools | ||
- libssl-dev | ||
- libbind-dev | ||
- libpcap-dev | ||
- unzip | ||
- wget | ||
- gcc | ||
- make | ||
- git | ||
- zsh | ||
|
||
# - name: Cloning Dowse source from dyne.org git repository | ||
# git: | ||
# repo=https://github.com/dyne/dowse | ||
# dest=/opt/dowse | ||
# #version=v0.8 | ||
|
||
- shell: mkdir -p /opt/dowse | ||
- name: Cloning Dowse source from host git repository | ||
synchronize: src=../ dest=/opt/dowse/ | ||
archive=yes | ||
|
||
- name: Compiling Dowse source code | ||
shell: ./src/compile.sh > compile.log | ||
chdir=/opt/dowse | ||
|
||
- name: Installing Dowse and its daemons on system | ||
shell: ./utils/debian_deps.sh > install.log | ||
chdir=/opt/dowse | ||
|
||
# change this script for configs | ||
- name: Configuring Dowse | ||
script: dowse_setup.sh | ||
|
||
- name: Starting Dowse | ||
shell: ./start.sh | ||
chdir=/opt/dowse |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#!/usr/bin/zsh | ||
|
||
# simple script to create dowse/conf/settings via ansible | ||
# takes for arguments: address, interface, wan and lan domain | ||
a=192.168.0.254 | ||
n=192.168.0.0/24 | ||
g=192.168.0.101,192.168.0.199,48h | ||
m=255.255.255.0 | ||
i=eth1 | ||
w=10.0.2.2 | ||
d=8.8.8.8 | ||
l=dowse.equipment | ||
|
||
[[ "$l" = "" ]] && { | ||
print "Error in arguments to dowse_setup.sh script" | ||
return 1 | ||
} | ||
|
||
cat <<EOF > /opt/dowse/conf/settings | ||
address=$a | ||
interface=$i | ||
hostname=\$(hostname) | ||
wan=$w | ||
dns=$d | ||
lan=$l | ||
firewall=no | ||
dowse_uid=proxy | ||
dowse_gid=proxy | ||
# | ||
dowse_net=$n | ||
netmask=$m | ||
dowse_guests=$g | ||
EOF | ||
|
||
cat <<EOF > /opt/dowse/conf/network | ||
# keep | ||
EOF | ||
|
||
rm -f /etc/resolv.conf | ||
print "nameserver $a" > /etc/resolv.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters