Skip to content

Commit

Permalink
Consolidate to a single tools/ow-utils docker image
Browse files Browse the repository at this point in the history
Rather than defining separate images for running shell scripts,
running ansible playbooks, running gradle tasks, etc. switch
to an uber utility image that will include wsk, wsk-deploy,
and all the software packages to execute our various scripting
languages.
  • Loading branch information
dgrove-oss committed Dec 5, 2018
1 parent de2663f commit e410780
Show file tree
Hide file tree
Showing 10 changed files with 50 additions and 123 deletions.
3 changes: 1 addition & 2 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ include 'tests'
include 'tests:performance:gatling_tests'

include 'tools:actionProxy'
include 'tools:ansibleRunner'
include 'tools:scriptRunner'
include 'tools:ow-utils'
include 'tools:dev'

include 'tools:admin'
Expand Down
28 changes: 0 additions & 28 deletions tools/ansibleRunner/Dockerfile

This file was deleted.

19 changes: 0 additions & 19 deletions tools/ansibleRunner/build.gradle

This file was deleted.

2 changes: 1 addition & 1 deletion tools/jenkins/apache/dockerhub.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ node('xenial&&!H21&&!H22&&!H11&&!ubuntu-eu3') {
withCredentials([usernamePassword(credentialsId: 'openwhisk_dockerhub', passwordVariable: 'DOCKER_PASSWORD', usernameVariable: 'DOCKER_USER')]) {
sh 'docker login -u ${DOCKER_USER} -p ${DOCKER_PASSWORD}'
}
def PUSH_CMD = "./gradlew :core:controller:distDocker :core:invoker:distDocker :tools:scriptRunner:distDocker :tools:ansibleRunner:distDocker -PdockerRegistry=docker.io -PdockerImagePrefix=openwhisk"
def PUSH_CMD = "./gradlew :core:controller:distDocker :core:invoker:distDocker :tools:ow-utils:distDocker -PdockerRegistry=docker.io -PdockerImagePrefix=openwhisk"
def gitCommit = sh(returnStdout: true, script: 'git rev-parse HEAD').trim()
def shortCommit = gitCommit.take(7)
sh "${PUSH_CMD} -PdockerImageTag=latest"
Expand Down
41 changes: 41 additions & 0 deletions tools/ow-utils/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
# license agreements; and to You under the Apache License, Version 2.0.

FROM adoptopenjdk/openjdk8:jdk8u191-b12

ENV DOCKER_VERSION 1.12.0
ENV WHISK_CLI_VERSION latest
ENV WHISKDEPLOY_CLI_VERSION latest

RUN apt-get update && apt-get install -y \
git \
libffi-dev \
nodejs \
npm \
python \
python-pip \
wget \
zip \
&& rm -rf /var/lib/apt/lists/*

# Python packages
RUN pip install --upgrade pip
RUN pip install --upgrade setuptools
RUN pip install ansible==2.5.2
RUN pip install jinja2==2.9.6

# Install docker client
RUN wget --no-verbose https://get.docker.com/builds/Linux/x86_64/docker-${DOCKER_VERSION}.tgz && \
tar --strip-components 1 -xvzf docker-${DOCKER_VERSION}.tgz -C /usr/bin docker/docker && \
rm -f docker-${DOCKER_VERSION}.tgz && \
chmod +x /usr/bin/docker

# # Install `wsk` cli in /usr/local/bin
RUN wget -q https://github.com/apache/incubator-openwhisk-cli/releases/download/$WHISK_CLI_VERSION/OpenWhisk_CLI-$WHISK_CLI_VERSION-linux-amd64.tgz && \
tar xzf OpenWhisk_CLI-$WHISK_CLI_VERSION-linux-amd64.tgz -C /usr/local/bin wsk && \
rm OpenWhisk_CLI-$WHISK_CLI_VERSION-linux-amd64.tgz

# # Install `wskdeploy` cli in /usr/local/bin
RUN wget -q https://github.com/apache/incubator-openwhisk-wskdeploy/releases/download/$WHISKDEPLOY_CLI_VERSION/openwhisk_wskdeploy-$WHISKDEPLOY_CLI_VERSION-linux-amd64.tgz && \
tar xzf openwhisk_wskdeploy-$WHISK_CLI_VERSION-linux-amd64.tgz -C /usr/local/bin wskdeploy && \
rm openwhisk_wskdeploy-$WHISK_CLI_VERSION-linux-amd64.tgz
11 changes: 6 additions & 5 deletions tools/ansibleRunner/README.md → tools/ow-utils/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@
#
-->

Utility image for executing ansible playbooks
Utility image for executing tasks
================

The `ansible-runner` base image is intended to be used to execute
utility tasks defined as ansible playbooks. The playbook to be
executed should be mounted in the container as /task/playbook.yml by
Kubernetes/Docker/Mesos.
This `ow-utils` image can be used to execute various utility tasks
for OpenWhisk using most of the tools that are used in the project.
It includes a JDK8, python/ansible, nodejs, and standard packages
such as bash, git, wget, curl, and docker.

It also includes the `wsk` and `wskdeploy` CLIs.
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
* limitations under the License.
*/

ext.dockerImageName = 'script-runner'
ext.dockerImageName = 'ow-utils'
apply from: '../../gradle/docker.gradle'
26 changes: 0 additions & 26 deletions tools/scriptRunner/Dockerfile

This file was deleted.

28 changes: 0 additions & 28 deletions tools/scriptRunner/README.md

This file was deleted.

13 changes: 0 additions & 13 deletions tools/scriptRunner/init.sh

This file was deleted.

0 comments on commit e410780

Please sign in to comment.