Skip to content

Commit a9befa0

Browse files
committed
Merge branch 'release-2.0.19' into stable
2 parents 8e007b8 + b642c9c commit a9befa0

File tree

5 files changed

+142
-31
lines changed

5 files changed

+142
-31
lines changed

.travis.yml

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
language: bash
2+
3+
services:
4+
- docker
5+
env:
6+
global:
7+
- NAME="osixia/keepalived"
8+
- VERSION="${TRAVIS_BRANCH}-dev"
9+
matrix:
10+
- TARGET_ARCH=amd64 QEMU_ARCH=x86_64
11+
- TARGET_ARCH=arm32v7 QEMU_ARCH=arm
12+
- TARGET_ARCH=arm64v8 QEMU_ARCH=aarch64
13+
14+
addons:
15+
apt:
16+
# The docker manifest command was added in docker-ee version 18.x
17+
# So update our current installation and we also have to enable the experimental features.
18+
sources:
19+
- sourceline: "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
20+
key_url: "https://download.docker.com/linux/ubuntu/gpg"
21+
packages:
22+
- docker-ce
23+
24+
before_install:
25+
- docker --version
26+
- mkdir $HOME/.docker
27+
- 'echo "{" > $HOME/.docker/config.json'
28+
- 'echo " \"experimental\": \"enabled\"" >> $HOME/.docker/config.json'
29+
- 'echo "}" >> $HOME/.docker/config.json'
30+
- sudo service docker restart
31+
32+
install:
33+
# For cross buidling our images
34+
# This is necessary because travis-ci.org has only x86_64 machines.
35+
# If travis-ci.org gets native arm builds, probably this step is not
36+
# necessary any more.
37+
- docker run --rm --privileged multiarch/qemu-user-static:register --reset
38+
# Bats is necessary for the UT
39+
- curl -o bats.tar.gz -SL https://github.com/bats-core/bats-core/archive/v1.1.0.tar.gz
40+
- mkdir bats-core && tar -xf bats.tar.gz -C bats-core --strip-components=1
41+
- cd bats-core/
42+
- sudo ./install.sh /usr/local
43+
- cd ..
44+
45+
before_script:
46+
# Set baseimage.
47+
- sed -i -e "s/FROM \(.*\)/FROM \1-${TARGET_ARCH}/g" image/Dockerfile;
48+
- cat image/Dockerfile;
49+
# If this is a tag then change the VERSION variable to only have the
50+
# tag name and not also the commit hash.
51+
- if [ -n "$TRAVIS_TAG" ]; then
52+
VERSION=$(echo "${TRAVIS_TAG}" | sed -e 's/\(.*\)[-v]\(.*\)/\1\2/g');
53+
fi
54+
- if [ "${TRAVIS_BRANCH}" == 'stable' ]; then
55+
VERSION="stable";
56+
fi
57+
58+
script:
59+
- make build-nocache NAME=${NAME} VERSION=${VERSION}-${TARGET_ARCH}
60+
# Run the test and if the test fails mark the build as failed.
61+
- make test NAME=${NAME} VERSION=${VERSION}-${TARGET_ARCH}
62+
63+
before_deploy:
64+
- docker run -d --name test_image ${NAME}:${VERSION}-${TARGET_ARCH} sleep 10
65+
- sleep 5
66+
- sudo docker ps | grep -q test_image
67+
# To have `DOCKER_USER` and `DOCKER_PASS`
68+
# use `travis env set`.
69+
- docker login -u "$DOCKER_USER" -p "$DOCKER_PASS";
70+
- make tag NAME=${NAME} VERSION=${VERSION}-${TARGET_ARCH}
71+
72+
deploy:
73+
provider: script
74+
on:
75+
all_branches: true
76+
script: make push NAME=${NAME} VERSION=${VERSION}-${TARGET_ARCH}
77+
78+
jobs:
79+
include:
80+
- stage: Manifest creation
81+
install: skip
82+
script: skip
83+
after_deploy:
84+
- docker login -u "$DOCKER_USER" -p "$DOCKER_PASS";
85+
- docker manifest create ${NAME}:${VERSION} ${NAME}:${VERSION}-amd64 ${NAME}:${VERSION}-arm32v7 ${NAME}:${VERSION}-arm64v8;
86+
docker manifest annotate ${NAME}:${VERSION} ${NAME}:${VERSION}-amd64 --os linux --arch amd64;
87+
docker manifest annotate ${NAME}:${VERSION} ${NAME}:${VERSION}-arm32v7 --os linux --arch arm --variant v7;
88+
docker manifest annotate ${NAME}:${VERSION} ${NAME}:${VERSION}-arm64v8 --os linux --arch arm64 --variant v8;
89+
90+
# The latest tag is coming from the stable branch of the repo
91+
- if [ "${TRAVIS_BRANCH}" == 'stable' ]; then
92+
docker manifest create ${NAME}:latest ${NAME}:${VERSION}-amd64 ${NAME}:${VERSION}-arm32v7 ${NAME}:${VERSION}-arm64v8;
93+
docker manifest annotate ${NAME}:latest ${NAME}:${VERSION}-amd64 --os linux --arch amd64;
94+
docker manifest annotate ${NAME}:latest ${NAME}:${VERSION}-arm32v7 --os linux --arch arm --variant v7;
95+
docker manifest annotate ${NAME}:latest ${NAME}:${VERSION}-arm64v8 --os linux --arch arm64 --variant v8;
96+
fi
97+
98+
- docker manifest push ${NAME}:${VERSION};
99+
if [ "${TRAVIS_BRANCH}" == 'stable' ]; then
100+
docker manifest push ${NAME}:latest;
101+
fi

CHANGELOG.md

Lines changed: 7 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.19] - 2019-11-15
9+
## Added
10+
- Multiarch support
11+
12+
### Changed
13+
- Upgrade keepalived version to 2.0.19
14+
815
## [2.0.17] - 2019-07-05
916
### Added
1017
- Curl

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
NAME = osixia/keepalived
2-
VERSION = 2.0.17
2+
VERSION = 2.0.19
33

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

@@ -12,6 +12,9 @@ build-nocache:
1212
test:
1313
env NAME=$(NAME) VERSION=$(VERSION) bats test/test.bats
1414

15+
tag:
16+
docker tag $(NAME):$(VERSION) $(NAME):$(VERSION)
17+
1518
tag-latest:
1619
docker tag $(NAME):$(VERSION) $(NAME):latest
1720

README.md

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -6,35 +6,35 @@
66

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

9-
Latest release: 2.0.17 - Keepalived 2.0.17 - [Changelog](CHANGELOG.md) | [Docker Hub](https://hub.docker.com/r/osixia/keepalived/) 
9+
Latest release: 2.0.19 - Keepalived 2.0.19 - [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/)
1313
1414
- [osixia/keepalived](#osixiakeepalived)
15-
- [Quick start](#Quick-start)
16-
- [Beginner Guide](#Beginner-Guide)
17-
- [Use your own Keepalived config](#Use-your-own-Keepalived-config)
18-
- [Fix docker mounted file problems](#Fix-docker-mounted-file-problems)
19-
- [Debug](#Debug)
20-
- [Environment Variables](#Environment-Variables)
21-
- [Set your own environment variables](#Set-your-own-environment-variables)
22-
- [Use command line argument](#Use-command-line-argument)
23-
- [Link environment file](#Link-environment-file)
24-
- [Make your own image or extend this image](#Make-your-own-image-or-extend-this-image)
25-
- [Advanced User Guide](#Advanced-User-Guide)
26-
- [Extend osixia/keepalived:2.0.17 image](#Extend-osixiakeepalived2017-image)
27-
- [Make your own keepalived image](#Make-your-own-keepalived-image)
28-
- [Tests](#Tests)
29-
- [Under the hood: osixia/light-baseimage](#Under-the-hood-osixialight-baseimage)
30-
- [Security](#Security)
31-
- [Changelog](#Changelog)
15+
- [Quick start](#quick-start)
16+
- [Beginner Guide](#beginner-guide)
17+
- [Use your own Keepalived config](#use-your-own-keepalived-config)
18+
- [Fix docker mounted file problems](#fix-docker-mounted-file-problems)
19+
- [Debug](#debug)
20+
- [Environment Variables](#environment-variables)
21+
- [Set your own environment variables](#set-your-own-environment-variables)
22+
- [Use command line argument](#use-command-line-argument)
23+
- [Link environment file](#link-environment-file)
24+
- [Make your own image or extend this image](#make-your-own-image-or-extend-this-image)
25+
- [Advanced User Guide](#advanced-user-guide)
26+
- [Extend osixia/keepalived:2.0.19 image](#extend-osixiakeepalived2019-image)
27+
- [Make your own keepalived image](#make-your-own-keepalived-image)
28+
- [Tests](#tests)
29+
- [Under the hood: osixia/light-baseimage](#under-the-hood-osixialight-baseimage)
30+
- [Security](#security)
31+
- [Changelog](#changelog)
3232

3333
## Quick start
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 --cap-add=NET_BROADCAST --cap-add=NET_RAW --net=host -d osixia/keepalived:2.0.17
37+
docker run --cap-add=NET_ADMIN --cap-add=NET_BROADCAST --cap-add=NET_RAW --net=host -d osixia/keepalived:2.0.19
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.17
47+
docker run --volume /data/my-keepalived.conf:/container/service/keepalived/assets/keepalived.conf --detach osixia/keepalived:2.0.19
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.17 --copy-service
57+
docker run [your options] osixia/keepalived:2.0.19 --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.17 --loglevel debug
66+
docker run --detach osixia/keepalived:2.0.19 --loglevel debug
6767

6868
See all command line options:
6969

70-
docker run osixia/keepalived:2.0.17 --help
70+
docker run osixia/keepalived:2.0.19 --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.17
91+
docker run --env KEEPALIVED_UNICAST_PEERS="#PYTHON2BASH:['192.168.1.10', '192.168.1.11']" --detach osixia/keepalived:2.0.19
9292

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

@@ -112,15 +112,15 @@ See how to [set your own environment variables](#set-your-own-environment-variab
112112
Environment variables can be set by adding the --env argument in the command line, for example:
113113

114114
docker run --env KEEPALIVED_INTERFACE="eno1" --env KEEPALIVED_PASSWORD="password!" \
115-
--env KEEPALIVED_PRIORITY="100" --detach osixia/keepalived:2.0.17
115+
--env KEEPALIVED_PRIORITY="100" --detach osixia/keepalived:2.0.19
116116

117117

118118
#### Link environment file
119119

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

122122
docker run --volume /data/environment/my-env.yaml:/container/environment/01-custom/env.yaml \
123-
--detach osixia/keepalived:2.0.17
123+
--detach osixia/keepalived:2.0.19
124124

125125
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).
126126

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

131131
## Advanced User Guide
132132

133-
### Extend osixia/keepalived:2.0.17 image
133+
### Extend osixia/keepalived:2.0.19 image
134134

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

137137
Dockerfile example:
138138

139-
FROM osixia/keepalived:2.0.17
139+
FROM osixia/keepalived:2.0.19
140140
MAINTAINER Your Name <[email protected]>
141141

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

image/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# Use osixia/light-baseimage
22
# sources: https://github.com/osixia/docker-light-baseimage
3-
FROM osixia/alpine-light-baseimage:0.1.6
3+
FROM osixia/light-baseimage:alpine-0.1.6-dev
44

55
# Keepalived version
6-
ARG KEEPALIVED_VERSION=2.0.17
6+
ARG KEEPALIVED_VERSION=2.0.19
77

88
# Download, build and install Keepalived
99
RUN apk --no-cache add \

0 commit comments

Comments
 (0)