Upgrade base docker image to Bionic(18.04)
This patch upgrades base docker image from Xenial(16.04) to Bionic(18.04), so that we can use the lastest LTS for both host and docker container images. Change-Id: I88191a00316ecae1ce3a6ff530fc7447cf27784e
This commit is contained in:
parent
905956ff81
commit
216551279b
@ -49,8 +49,8 @@ STORLETS_DEFAULT_USER_DOMAIN_ID=${STORLETS_DEFAULT_USER_DOMAIN_ID:-default}
|
||||
STORLETS_DEFAULT_PROJECT_DOMAIN_ID=${STORLETS_DEFAULT_PROJECT_DOMAIN_ID:-default}
|
||||
STORLET_MANAGEMENT_USER=${STORLET_MANAGEMENT_USER:-$USER}
|
||||
STORLETS_DOCKER_DEVICE=${STORLETS_DOCKER_DEVICE:-/home/docker_device}
|
||||
STORLETS_DOCKER_BASE_IMG=${STORLETS_DOCKER_BASE_IMG:-ubuntu:16.04}
|
||||
STORLETS_DOCKER_BASE_IMG_NAME=${STORLETS_DOCKER_BASE_IMG_NAME:-ubuntu_16.04}
|
||||
STORLETS_DOCKER_BASE_IMG=${STORLETS_DOCKER_BASE_IMG:-ubuntu:18.04}
|
||||
STORLETS_DOCKER_BASE_IMG_NAME=${STORLETS_DOCKER_BASE_IMG_NAME:-ubuntu_18.04}
|
||||
STORLETS_DOCKER_SWIFT_GROUP_ID=${STORLETS_DOCKER_SWIFT_GROUP_ID:-1003}
|
||||
STORLETS_DOCKER_SWIFT_USER_ID=${STORLETS_DOCKER_SWIFT_USER_ID:-1003}
|
||||
STORLETS_SWIFT_RUNTIME_USER=${STORLETS_SWIFT_RUNTIME_USER:-$USER}
|
||||
|
@ -154,20 +154,20 @@ Step 1: Create a working space for building the docker images, e.g.
|
||||
::
|
||||
|
||||
mkdir -p $HOME/docker_repos
|
||||
sudo docker pull ubuntu:16_04
|
||||
sudo docker pull ubuntu:18.04
|
||||
|
||||
Step 2: Create a Docker image with Java
|
||||
|
||||
::
|
||||
|
||||
mkdir -p $HOME/docker_repos/ubuntu_16.04_jre8
|
||||
mkdir -p $HOME/docker_repos/ubuntu_18.04_jre8
|
||||
|
||||
Create the file: $HOME/docker_repos/ubuntu_16.04_jre8/Dockerfile
|
||||
Create the file: $HOME/docker_repos/ubuntu_18.04_jre8/Dockerfile
|
||||
with the following content:
|
||||
|
||||
::
|
||||
|
||||
FROM ubuntu:16.04
|
||||
FROM ubuntu:18.04
|
||||
MAINTAINER root
|
||||
|
||||
# The following operations shoud be defined in one line
|
||||
@ -184,8 +184,8 @@ Build the image
|
||||
|
||||
::
|
||||
|
||||
cd $HOME/docker_repos/ubuntu_16.04_jre8
|
||||
sudo docker build -q -t ubuntu_16.04_jre8 .
|
||||
cd $HOME/docker_repos/ubuntu_18.04_jre8
|
||||
sudo docker build -q -t ubuntu_18.04_jre8 .
|
||||
cd -
|
||||
|
||||
|
||||
@ -193,16 +193,16 @@ Step 3: Augment the above created image with the storlets stuff
|
||||
|
||||
::
|
||||
|
||||
mkdir -p $HOME/docker_repos/ubuntu_16.04_jre8_storlets
|
||||
mkdir -p $HOME/docker_repos/ubuntu_18.04_jre8_storlets
|
||||
cp $HOME/storlets/install/storlets/roles/docker_storlet_engine_image/files/logback.xml .
|
||||
cd -
|
||||
|
||||
Create the file: $HOME/docker_repos/ubuntu_16.04_jre8_storlets/Dockerfile
|
||||
Create the file: $HOME/docker_repos/ubuntu_18.04_jre8_storlets/Dockerfile
|
||||
with the following content:
|
||||
|
||||
::
|
||||
|
||||
FROM ubuntu_16.04_jre8
|
||||
FROM ubuntu_18.04_jre8
|
||||
|
||||
MAINTAINER root
|
||||
|
||||
@ -222,8 +222,8 @@ Build the image
|
||||
|
||||
::
|
||||
|
||||
cd $HOME/docker_repos/ubuntu_16.04_jre8_storlets
|
||||
sudo docker build -q -t ubuntu_16.04_jre8_storlets .
|
||||
cd $HOME/docker_repos/ubuntu_18.04_jre8_storlets
|
||||
sudo docker build -q -t ubuntu_18.04_jre8_storlets .
|
||||
cd -
|
||||
|
||||
Step 4: Create a tenant specific image. The engine looks for images
|
||||
@ -242,12 +242,12 @@ The response from the above contains the account line, e.g.:
|
||||
|
||||
The account id is the number following the 'AUTH\_' prefix.
|
||||
|
||||
Next create the file $HOME/docker_repos/ubuntu_16.04_jre8_storlets_<account id>/Dockerfile
|
||||
Next create the file $HOME/docker_repos/ubuntu_18.04_jre8_storlets_<account id>/Dockerfile
|
||||
with the following content:
|
||||
|
||||
::
|
||||
|
||||
FROM ubuntu_16.04_jre8_storlets
|
||||
FROM ubuntu_18.04_jre8_storlets
|
||||
MAINTAINER root
|
||||
|
||||
|
||||
@ -255,7 +255,7 @@ Build the image
|
||||
|
||||
::
|
||||
|
||||
cd $HOME/docker_repos/ubuntu_16.04_jre8_storlets_<account id>
|
||||
cd $HOME/docker_repos/ubuntu_18.04_jre8_storlets_<account id>
|
||||
sudo docker build -q -t <account id> .
|
||||
cd -
|
||||
|
||||
|
@ -247,6 +247,9 @@ class RunTimeSandbox(object):
|
||||
# TODO(change logger's route if possible)
|
||||
self.logger = logger
|
||||
|
||||
self.default_docker_image_name = \
|
||||
conf.get('default_docker_image_name', 'ubuntu_18.04_jre8_storlets')
|
||||
|
||||
def ping(self):
|
||||
"""
|
||||
Ping to daemon factory process inside container
|
||||
@ -354,12 +357,9 @@ class RunTimeSandbox(object):
|
||||
self.logger.exception("Failed to start docker container from "
|
||||
"tenant image %s" % docker_image_name)
|
||||
|
||||
# TODO(eranr): move the default tenant image name to a config var
|
||||
docker_image_name = 'ubuntu_16.04_jre8_storlets'
|
||||
|
||||
self.logger.info("Trying to start docker container from default "
|
||||
"image: %s" % docker_image_name)
|
||||
self._restart(docker_image_name)
|
||||
"image: %s" % self.default_docker_image_name)
|
||||
self._restart(self.default_docker_image_name)
|
||||
self.wait()
|
||||
|
||||
def start_storlet_daemon(
|
||||
|
Loading…
x
Reference in New Issue
Block a user