Skip to content

Commit 1dcf143

Browse files
committed
Merge branch 'release-2.0.11' into stable
2 parents 73de32f + e174f53 commit 1dcf143

7 files changed

Lines changed: 29 additions & 16 deletions

File tree

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ Please refer to the upstream [keepalived changelog](https://github.com/acassen/k
55
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
66
and this project follows keepalived versioning.
77

8+
## [2.0.11] - 2019-01.21
9+
### Added
10+
- KEEPALIVED_STATE environment variable
11+
12+
### Changed
13+
- Upgrade keepalived version to 2.0.11
14+
815
## [2.0.10] - 2018-11-13
916
### Changed
1017
- Upgrade keepalived version to 2.0.10
@@ -159,6 +166,8 @@ and this project follows keepalived versioning.
159166
## 0.1.0 - 2015-06-16
160167
Initial release
161168

169+
[2.0.11]: https://github.com/osixia/docker-keepalived/compare/v2.0.10...v2.0.11
170+
[2.0.10]: https://github.com/osixia/docker-keepalived/compare/v1.4.5...v2.0.10
162171
[1.4.5]: https://github.com/osixia/docker-keepalived/compare/v1.4.4...v1.4.5
163172
[1.4.4]: https://github.com/osixia/docker-keepalived/compare/v1.4.2...v1.4.4
164173
[1.4.2]: https://github.com/osixia/docker-keepalived/compare/v1.4.1...v1.4.2

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
NAME = osixia/keepalived
2-
VERSION = 2.0.10
2+
VERSION = 2.0.11
33

44
.PHONY: build build-nocache test tag-latest push push-latest release git-tag-version
55

README.md

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
[hub]: https://hub.docker.com/r/osixia/keepalived/
88

9-
Latest release: 2.0.10 - Keepalived 2.0.10 - [Changelog](CHANGELOG.md) | [Docker Hub](https://hub.docker.com/r/osixia/keepalived/) 
9+
Latest release: 2.0.11 - Keepalived 2.0.11 - [Changelog](CHANGELOG.md) | [Docker Hub](https://hub.docker.com/r/osixia/keepalived/) 
1010

1111
**A docker image to run Keepalived.**
1212
> [keepalived.org](http://keepalived.org/)
@@ -23,7 +23,7 @@ Latest release: 2.0.10 - Keepalived 2.0.10 - [Changelog](CHANGELOG.md) | [Docker
2323
- [Link environment file](#link-environment-file)
2424
- [Make your own image or extend this image](#make-your-own-image-or-extend-this-image)
2525
- [Advanced User Guide](#advanced-user-guide)
26-
- [Extend osixia/keepalived:2.0.10 image](#extend-osixiakeepalived2010-image)
26+
- [Extend osixia/keepalived:2.0.11 image](#extend-osixiakeepalived2011-image)
2727
- [Make your own keepalived image](#make-your-own-keepalived-image)
2828
- [Tests](#tests)
2929
- [Under the hood: osixia/light-baseimage](#under-the-hood-osixialight-baseimage)
@@ -34,7 +34,7 @@ Latest release: 2.0.10 - Keepalived 2.0.10 - [Changelog](CHANGELOG.md) | [Docker
3434

3535
This image require the kernel module ip_vs loaded on the host (`modprobe ip_vs`) and need to be run with : --cap-add=NET_ADMIN --net=host
3636

37-
docker run --cap-add=NET_ADMIN --net=host -d osixia/keepalived:2.0.10
37+
docker run --cap-add=NET_ADMIN --net=host -d osixia/keepalived:2.0.11
3838

3939
## Beginner Guide
4040

@@ -44,7 +44,7 @@ but setting your own keepalived.conf is possible. 2 options:
4444

4545
- Link your config file at run time to `/container/service/keepalived/assets/keepalived.conf` :
4646

47-
docker run --volume /data/my-keepalived.conf:/container/service/keepalived/assets/keepalived.conf --detach osixia/keepalived:2.0.10
47+
docker run --volume /data/my-keepalived.conf:/container/service/keepalived/assets/keepalived.conf --detach osixia/keepalived:2.0.11
4848

4949
- Add your config file by extending or cloning this image, please refer to the [Advanced User Guide](#advanced-user-guide)
5050

@@ -54,7 +54,7 @@ You may have some problems with mounted files on some systems. The startup scrip
5454

5555
To fix that run the container with `--copy-service` argument :
5656

57-
docker run [your options] osixia/keepalived:2.0.10 --copy-service
57+
docker run [your options] osixia/keepalived:2.0.11 --copy-service
5858

5959
### Debug
6060

@@ -63,11 +63,11 @@ Available levels are: `none`, `error`, `warning`, `info`, `debug` and `trace`.
6363

6464
Example command to run the container in `debug` mode:
6565

66-
docker run --detach osixia/keepalived:2.0.10 --loglevel debug
66+
docker run --detach osixia/keepalived:2.0.11 --loglevel debug
6767

6868
See all command line options:
6969

70-
docker run osixia/keepalived:2.0.10 --help
70+
docker run osixia/keepalived:2.0.11 --help
7171

7272

7373
## Environment Variables
@@ -88,7 +88,7 @@ See how to [set your own environment variables](#set-your-own-environment-variab
8888

8989
If you want to set this variable at docker run command add the tag `#PYTHON2BASH:` and convert the yaml in python:
9090

91-
docker run --env KEEPALIVED_UNICAST_PEERS="#PYTHON2BASH:['192.168.1.10', '192.168.1.11']" --detach osixia/keepalived:2.0.10
91+
docker run --env KEEPALIVED_UNICAST_PEERS="#PYTHON2BASH:['192.168.1.10', '192.168.1.11']" --detach osixia/keepalived:2.0.11
9292

9393
To convert yaml to python online : http://yaml-online-parser.appspot.com/
9494

@@ -104,21 +104,23 @@ See how to [set your own environment variables](#set-your-own-environment-variab
104104

105105
- **KEEPALIVED_COMMAND_LINE_ARGUMENTS** Keepalived command line arguments; Defaults to `--log-detail --dump-conf`
106106

107+
- **KEEPALIVED_STATE** The starting state of keepalived; it can either be MASTER or BACKUP.
108+
107109
### Set your own environment variables
108110

109111
#### Use command line argument
110112
Environment variables can be set by adding the --env argument in the command line, for example:
111113

112114
docker run --env KEEPALIVED_INTERFACE="eno1" --env KEEPALIVED_PASSWORD="password!" \
113-
--env KEEPALIVED_PRIORITY="100" --detach osixia/keepalived:2.0.10
115+
--env KEEPALIVED_PRIORITY="100" --detach osixia/keepalived:2.0.11
114116

115117

116118
#### Link environment file
117119

118120
For example if your environment file is in : /data/environment/my-env.yaml
119121

120122
docker run --volume /data/environment/my-env.yaml:/container/environment/01-custom/env.yaml \
121-
--detach osixia/keepalived:2.0.10
123+
--detach osixia/keepalived:2.0.11
122124

123125
Take care to link your environment file to `/container/environment/XX-somedir` (with XX < 99 so they will be processed before default environment files) and not directly to `/container/environment` because this directory contains predefined baseimage environment files to fix container environment (INITRD, LANG, LANGUAGE and LC_CTYPE).
124126

@@ -128,13 +130,13 @@ This is the best solution if you have a private registry. Please refer to the [A
128130

129131
## Advanced User Guide
130132

131-
### Extend osixia/keepalived:2.0.10 image
133+
### Extend osixia/keepalived:2.0.11 image
132134

133135
If you need to add your custom TLS certificate, bootstrap config or environment files the easiest way is to extends this image.
134136

135137
Dockerfile example:
136138

137-
FROM osixia/keepalived:2.0.10
139+
FROM osixia/keepalived:2.0.11
138140
MAINTAINER Your Name <your@name.com>
139141

140142
ADD keepalived.conf /container/service/keepalived/assets/keepalived.conf

image/Dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
FROM osixia/alpine-light-baseimage:0.1.5
44

55
# Keepalived version
6-
ARG KEEPALIVED_VERSION=2.0.10
6+
ARG KEEPALIVED_VERSION=2.0.11
77

88
# Download, build and install Keepalived
99
RUN apk --no-cache add \
@@ -43,7 +43,6 @@ RUN apk --no-cache add \
4343
musl-dev \
4444
openssl-dev
4545

46-
4746
# Add service directory to /container/service
4847
ADD service /container/service
4948

image/environment/default.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,5 @@ KEEPALIVED_VIRTUAL_IPS:
1818
KEEPALIVED_NOTIFY: /container/service/keepalived/assets/notify.sh
1919

2020
KEEPALIVED_ROUTER_ID: 51
21+
22+
KEEPALIVED_STATE: BACKUP

image/service/keepalived/assets/keepalived.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ global_defs {
55
vrrp_instance VI_1 {
66
interface {{ KEEPALIVED_INTERFACE }}
77

8-
state BACKUP
8+
state {{ KEEPALIVED_STATE }}
99
virtual_router_id {{ KEEPALIVED_ROUTER_ID }}
1010
priority {{ KEEPALIVED_PRIORITY }}
1111
nopreempt

image/service/keepalived/startup.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ if [ ! -e "$FIRST_START_DONE" ]; then
1111
#
1212
# bootstrap config
1313
#
14+
sed -i "s|{{ KEEPALIVED_STATE }}|$KEEPALIVED_STATE|g" ${CONTAINER_SERVICE_DIR}/keepalived/assets/keepalived.conf
1415
sed -i "s|{{ KEEPALIVED_ROUTER_ID }}|$KEEPALIVED_ROUTER_ID|g" ${CONTAINER_SERVICE_DIR}/keepalived/assets/keepalived.conf
1516
sed -i "s|{{ KEEPALIVED_INTERFACE }}|$KEEPALIVED_INTERFACE|g" ${CONTAINER_SERVICE_DIR}/keepalived/assets/keepalived.conf
1617
sed -i "s|{{ KEEPALIVED_PRIORITY }}|$KEEPALIVED_PRIORITY|g" ${CONTAINER_SERVICE_DIR}/keepalived/assets/keepalived.conf

0 commit comments

Comments
 (0)