Skip to content

Commit

Permalink
Version bump for rebuild
Browse files Browse the repository at this point in the history
Simplify nomad startup due to run errors with raft networks

Disable nomad update check
  • Loading branch information
bretton committed May 1, 2023
1 parent 82a24eb commit ab04702
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 10 deletions.
2 changes: 2 additions & 0 deletions nomad-server/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
* Add autopilot stanza to nomad config and disable some defaults to see if leader election improves in poor latency environments
* Include parameter to set raft_multiplier value, or set to default of 1
* Fix missing pipe in configure nomad script
* Simplify nomad startup due to run errors with raft networks
* Disable nomad update check

---

Expand Down
2 changes: 1 addition & 1 deletion nomad-server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Please note that a specific network configuration is suggested (see Installation
* This jail does not work with a public bridge, so clone it to use an IP address directly on your host:
```sudo pot clone -P <nameofimportedjail> -p <clonejailname> -N alias -i "<interface>|<ipaddress>"```
e.g.
```sudo pot clone -P nomad-server-amd64-13_3_4_6 -p my-nomad-server -N alias -i "em0|10.10.10.11"```
```sudo pot clone -P nomad-server-amd64-13_3_4_7 -p my-nomad-server -N alias -i "em0|10.10.10.11"```
* Optionally copy-in job files in `jobname.nomad` filenaming convention to /root/nomadjobs, repeat for multiple files
```sudo pot -p <clonejailname> copy-in -s /root/nomadjobs/jobname.nomad -d /root/nomadjobs/jobname.nomad```
* Adjust to your environment:
Expand Down
19 changes: 14 additions & 5 deletions nomad-server/nomad-server.d/local/bin/cook
Original file line number Diff line number Diff line change
Expand Up @@ -126,13 +126,22 @@ service node_exporter start
log "Configure nomad"
configure-nomad.sh

log "Start nomad"
timeout --foreground 120 \
sh -c 'while ! service nomad status; do
service nomad start || true; sleep 5;
done'
# causing problems in testing with raft networks, fine without
#log "Start nomad"
#timeout --foreground 120 \
# sh -c 'while ! service nomad status; do
# service nomad start || true; sleep 5;
# done'

# simplify and test
log "Start nomad and sleep 30 (testing)"
service nomad start || true
# allow raft network to form
sleep 30


if [ "$IMPORTJOBS" != 0 ]; then
log "Import custom nomad jobs"
configure-jobs.sh
fi

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ server {
encrypt = "%%nomadgossipkey%%"
heartbeat_grace = "10s"
rejoin_after_leave = true
# Change from 1 to 2-5 for higher latency environments
raft_multiplier = %%raftmultiplier%%
}
tls {
Expand Down Expand Up @@ -51,6 +52,7 @@ autopilot {
disable_upgrade_migration = false
enable_custom_upgrades = false
}
enable_syslog=true
log_level="WARN"
syslog_facility="LOCAL5"
enable_syslog = true
log_level = "WARN"
syslog_facility = "LOCAL5"
disable_update_check = true
2 changes: 1 addition & 1 deletion nomad-server/nomad-server.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[manifest]
potname="nomad-server"
author = "Stephan Lichtenauer, Bretton Vine, Michael Gmelin"
version="3.4.6"
version="3.4.7"
origin="freebsd"
runs_in_nomad="false"

0 comments on commit ab04702

Please sign in to comment.