0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Dockerfile for OpenStack keystone queens

Last updated at Posted at 2018-08-30

運用中のopenstack proxyサービスのkeystone versionをv2からv3へ、対応versionは「queens」にする必要がありまして、開発環境提供を目的にしたqueens versionのkeystone instanceをdockerで作りました。

FROM python:2.7
MAINTAINER crowdy "crowdy@gmail.com"

ENV VERSION=13.0.1

RUN set -x \
    && apt-get -y update \
    && apt-get install -y libffi-dev python-dev libssl-dev mysql-client python-mysqldb \
    && apt-get -y clean

RUN curl -fSL https://github.com/openstack/keystone/archive/${VERSION}.tar.gz -o keystone-${VERSION}.tar.gz \
    && tar xvf keystone-${VERSION}.tar.gz \
    && cd keystone-${VERSION} \
    && pip install -r requirements.txt \
    && PBR_VERSION=${VERSION}  pip install . \
    && pip install uwsgi MySQL-python \
    && cp -r etc /etc/keystone \
    && pip install python-openstackclient \
    && cd - \
    && rm -rf keystone-${VERSION}*

COPY keystone.conf /etc/keystone/keystone.conf
COPY keystone.sql /root/keystone.sql

# Add bootstrap script and make it executable
COPY bootstrap.sh /etc/bootstrap.sh
RUN chown root:root /etc/bootstrap.sh && chmod a+x /etc/bootstrap.sh

ENTRYPOINT ["/etc/bootstrap.sh"]
EXPOSE 5000 35357

HEALTHCHECK --interval=10s --timeout=5s \
  CMD curl -f http://localhost:5000/v3 2> /dev/null || exit 1; \
  curl -f http://localhost:35357/v3 2> /dev/null || exit 1; \


#######################################
#
# 1) for VERSION, see https://releases.openstack.org/queens/index.html
# 2) to build image
# docker build -t openstack-keystone:queens .
# 3) to run image
# docker run -d -ti -p 35357:35357 --name keystone -p 5000:5000 openstack-keystone:queens
# 4) test
# curl http://localhost:5000/
# curl http://localhost:5000/v3

Dockerfileは https://github.com/crowdy/docker-keystone にもあります。

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?