Skip to content

Commit

Permalink
Merge pull request #54 from scline/1.2.6a
Browse files Browse the repository at this point in the history
Fix #52
  • Loading branch information
scline authored Oct 30, 2019
2 parents fc7e0cd + 571d5f2 commit 4906782
Show file tree
Hide file tree
Showing 6 changed files with 62 additions and 4 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,10 @@ REPLACE INTO `%DB_NAME%`.`settings` (`name`, `value`) VALUES('poller_type', '2')
```

# Change Log
#### 1.2.6a - 10/30/2019
* Update start.sh to persist Apache Cacti configurations on restart. [#52] (https://github.com/scline/docker-cacti/issues/52)
* Update docker-compose examples to use different type of volumes so `docker-compose down` will not affect data without the `-v` flag.

#### 1.2.6 - 09/06/2019
* Update Cacti and Spine from 1.2.0 to 1.2.6
* [changelog][cacti_changelog]
Expand Down
18 changes: 18 additions & 0 deletions docker-compose/cacti_multi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ services:
- DB_ROOT_PASS=rootpassword
- INITIALIZE_DB=1
- TZ=America/Los_Angeles
volumes:
- cacti-master-data:/cacti
- cacti-master-backups:/backups
links:
- db-master

Expand All @@ -37,6 +40,9 @@ services:
- REMOTE_POLLER=1
- INITIALIZE_DB=1
- TZ=America/Los_Angeles
volumes:
- cacti-poller-data:/cacti
- cacti-poller-backups:/backups
links:
- db-poller

Expand All @@ -61,6 +67,8 @@ services:
environment:
- MYSQL_ROOT_PASSWORD=rootpassword
- TZ=America/Los_Angeles
volumes:
- cacti-db-master:/var/lib/mysql

db-poller:
image: "percona:5.7.14"
Expand All @@ -81,3 +89,13 @@ services:
environment:
- MYSQL_ROOT_PASSWORD=rootpassword
- TZ=America/Los_Angeles
volumes:
- cacti-db-poller:/var/lib/mysql

volumes:
cacti-db-master:
cacti-db-poller:
cacti-master-data:
cacti-master-backups:
cacti-poller-data:
cacti-poller-backups:
15 changes: 15 additions & 0 deletions docker-compose/cacti_multi_shared.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ services:
- DB_ROOT_PASS=rootpassword
- INITIALIZE_DB=1
- TZ=America/Los_Angeles
volumes:
- cacti-master-data:/cacti
- cacti-master-backups:/backups
links:
- db

Expand All @@ -37,6 +40,9 @@ services:
- REMOTE_POLLER=1
- INITIALIZE_DB=1
- TZ=America/Los_Angeles
volumes:
- cacti-poller-data:/cacti
- cacti-poller-backups:/backups
links:
- db

Expand All @@ -61,3 +67,12 @@ services:
environment:
- MYSQL_ROOT_PASSWORD=rootpassword
- TZ=America/Los_Angeles
volumes:
- cacti-db:/var/lib/mysql

volumes:
cacti-db:
cacti-master-data:
cacti-master-backups:
cacti-poller-data:
cacti-poller-backups:
10 changes: 8 additions & 2 deletions docker-compose/cacti_single_install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ services:
- INITIALIZE_DB=1
- TZ=America/Los_Angeles
volumes:
- /docker/cacti:/cacti
- /docker/backups:/backups
- cacti-data:/cacti
- cacti-backups:/backups
links:
- db
db:
Expand All @@ -40,3 +40,9 @@ services:
environment:
- MYSQL_ROOT_PASSWORD=rootpassword
- TZ=America/Los_Angeles
volumes:
- cacti-db/var/lib/mysql
volumes:
cacti-db:
cacti-data:
cacti-backups:
10 changes: 8 additions & 2 deletions docker-compose/cacti_testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ services:
- INITIALIZE_DB=1
- TZ=America/Los_Angeles
volumes:
- ~/docker/cacti:/cacti
- ~/docker/backups:/backups
- cacti-data:/cacti
- cacti-backups:/backups
links:
- db
db:
Expand All @@ -42,3 +42,9 @@ services:
environment:
- MYSQL_ROOT_PASSWORD=rootpassword
- TZ=America/Los_Angeles
volumes:
- cacti-db:/var/lib/mysql
volumes:
cacti-db:
cacti-data:
cacti-backups:
9 changes: 9 additions & 0 deletions start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,15 @@ if [ ! -f /cacti/install.lock ]; then
echo "$(date +%F_%R) [New Install] Creating lock file, db setup complete."
fi

# copy configuration files in the event /cacti is being shared as a volume
echo "$(date +%F_%R) [Apache] Validating httpd cacti configuration is present."
if [ -f "/etc/httpd/conf.d/cacti.conf" ]; then
echo "$(date +%F_%R) [Apache] /etc/httpd/conf.d/cacti.conf exist, nothing to do."
else
echo "$(date +%F_%R) [Apache] /etc/httpd/conf.d/cacti.conf does not exist, copying a new one over."
cp /template_configs/cacti.conf /etc/httpd/conf.d/
fi

# correcting file permissions
echo "$(date +%F_%R) [Note] Setting cacti file permissions."
chown -R apache.apache /cacti/resource/
Expand Down

0 comments on commit 4906782

Please sign in to comment.