forked from theopenlab/spark
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new role "install-docker" (apache#571)
The new role "install-docker" install docker-ce by using get.docker.com script, it support multiple OS and arch, and keep consistent docker-ce version, mark role "install-docker-ce" as deprecated, and apply new role in all of docker-machine jobs. Update tag of docker-machine job from latest-release to 18.06 in order to avoid confusions. Related-Bug: theopenlab/openlab#308
- Loading branch information
1 parent
7d8cb34
commit 5d90f8f
Showing
5 changed files
with
50 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
--- | ||
docker_version: "latest" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
- name: Install Docker CE {{ docker_version }} using get.docker.com | ||
shell: | ||
cmd: | | ||
set -x | ||
set -e | ||
# Download docker install script | ||
# The script worked on multiple OS (Ubuntu, CentOS, SUSE) and Archs (x86_64 and aarch64) | ||
# and have consistent docker-ce version, like: 18.06, 18.09 | ||
curl -fsSL https://get.docker.com -o get-docker.sh | ||
# Install docker ce. | ||
if [[ "{{ docker_version }}" == "latest" ]]; then | ||
sh get-docker.sh | ||
else | ||
VERSION="{{ docker_version }}" sh get-docker.sh | ||
fi | ||
# Stopping firewall and allow all traffic | ||
iptables -F | ||
iptables -X | ||
iptables -t nat -F | ||
iptables -t nat -X | ||
iptables -t mangle -F | ||
iptables -t mangle -X | ||
iptables -P INPUT ACCEPT | ||
iptables -P FORWARD ACCEPT | ||
iptables -P OUTPUT ACCEPT | ||
# Restart docker. | ||
systemctl daemon-reload | ||
systemctl restart docker | ||
executable: /bin/bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters