Unable to start seesaw
- Dominant language
- Go
- Stars
- 5.7k
- Forks
- 505
- PR merge metrics
- No merged PRs in 30d
Description
I have successfully installed seesaw with out any error and Im sharing it here hope it will help other beginners like me.
# Installing Go
```
apt-get update
apt-get install libnl-3-dev libnl-genl-3-dev
apt-get install curl git gcc make
apt-get install libcap2-bin
apt-get install protobuf-compiler
apt-get install golang
```
# After Installing golan run following command
`go env`
## Follwong output:
```
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH=""
GORACE=""
GOROOT="/usr/lib/go-1.6"
GOTOOLDIR="/usr/lib/go-1.6/pkg/tool/linux_amd64"
GO15VENDOREXPERIMENT="1"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0"
CXX="g++"
CGO_ENABLED="1"
```
# Fixing Path issue:
This path GOPATH="" should not be empty to fix this use following
```
export GOPATH=$HOME/go
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
```
# For permanant path fix:
`vi /root/.bashrc`
# Paste the following line at the end of file:
```
export GOPATH=$HOME/go
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
```
# Now, It has to install Go packages in your GOPATH and in my case path is: /root/go
# Settingup-Go
```
go get -u golang.org/x/crypto/ssh
go get -u github.com/dlintw/goconf
go get -u github.com/golang/glog
go get -u github.com/golang/protobuf/{proto,protoc-gen-go}
go get -u github.com/miekg/dns
go get -u github.com/kylelemons/godebug/pretty
go get -u github.com/google/seesaw
```
# Compiling Seesaw Code:
```
cd /root/go/src/github.com/google/seesaw/
make test
make install
```
# Copy Installation-Script
copy seesaw_install.sh script and paste it into following path
```
cd /root/go/bin
chmod +x seesaw_install.sh
./seesaw_install.sh
```
# Modified the Install Script:
```
SEESAW_BIN="/usr/local/seesaw"
SEESAW_ETC="/etc/seesaw"
SEESAW_LOG="/var/log/seesaw"
INIT=`ps -p 1 -o comm=`
install -d "${SEESAW_BIN}" "${SEESAW_ETC}" "${SEESAW_LOG}"
install "${GOPATH}/bin/seesaw_cli" /usr/bin/seesaw
for component in {ecu,engine,ha,healthcheck,ncc,watchdog}; do
install "${GOPATH}/bin/seesaw_${component}" "${SEESAW_BIN}"
done
if [ $INIT = "init" ]; then
#install "etc/init/seesaw_watchdog.conf" "/etc/init"
install "/root/go/src/github.com/google/seesaw/etc/init/seesaw_watchdog.conf" "/etc/init"
#elif [ $INIT = "systemd" ]; then
#install "etc/systemd/system/seesaw_watchdog.service" "/etc/systemd/system"
#systemctl --system daemon-reload
fi
#install "etc/seesaw/watchdog.cfg" "${SEESAW_ETC}"
install "/root/go/src/github.com/google/seesaw/etc/seesaw/watchdog.cfg" "${SEESAW_ETC}"
install "/root/go/src/github.com/google/seesaw/pb/config/config.proto" "${SEESAW_ETC}"
install "/root/go/src/github.com/google/seesaw/etc/seesaw/seesaw.cfg.example" "${SEESAW_ETC}"
install "/root/go/src/github.com/google/seesaw/etc/seesaw/cluster.pb.example" "${SEESAW_ETC}"
/bin/mv /etc/seesaw/seesaw.cfg.example /etc/seesaw/seesaw.cfg
/bin/mv /etc/seesaw/cluster.pb.example /etc/seesaw/cluster.pb
#Enable CAP_NET_RAW for seesaw binaries that require raw sockets.
/sbin/setcap cap_net_raw+ep "${SEESAW_BIN}/seesaw_ha"
/sbin/setcap cap_net_raw+ep "${SEESAW_BIN}/seesaw_healthcheck"
```
Now I'm stuck where to get start with , Ive made following changes in seesaw.cfg and cluster.pb file.
# Seesaw_cfg_file:
```
[cluster]
anycast_enabled = false
name = au-syd
node_ipv4 = 192.168.27.251
peer_ipv4 = 192.168.27.252
vip_ipv4 = 192.168.254.2
[config_server]
primary = seesaw-host1.com
secondary = seesaw-host2.com
#tertiary = seesaw-config3.example.com
[interface]
node = ens33 #Ethernet-1 on seesaw server
lb = ens34 #Ehetrnet-2 on seesaw server
```
# Cluster_pb_file:
```
seesaw_vip: <
fqdn: "seesaw-vip1.hostlb.com." #seesaw-server name
ipv4: "192.168.254.2/24" #ip on seesaw-server eth2
status: PRODUCTION
>
node: <
fqdn: "seesaw-host1.com." #vm-machine-1
ipv4: "192.168.27.251" #ip on vm-machine eth1
status: PRODUCTION
>
node: <
fqdn: "seesaw-host2.com." #vm-machine-2
ipv4: "192.168.27.252" #ip on vm-machine eth1
status: PRODUCTION
>
healthcheck: <
type: HTTP
interval: 4
timeout: 1
port: 11000
send: "/healthz"
tls_verify: false
>
```
Can any one guide me hwo to set itup furhter and run this? I'm lost
Regards
Tehseen
Contributor guide
Assessment
This issue has not been assessed yet.