docker file and ubuntu 16.04 package changes

Change-Id: I55bb9a7a49cea077b6426dbc4db9536a640a868d
This commit is contained in:
hosingh000 2017-11-27 13:55:04 -06:00
parent 208555554a
commit f7611c84c3
6 changed files with 109 additions and 28 deletions

64
Dockerfile Normal file
View File

@ -0,0 +1,64 @@
FROM ubuntu:16.04
ENV DEBIAN_FRONTEND noninteractive
ENV container docker
ENV PORT 9000
ENV LC_ALL C.UTF-8
ENV LANG C.UTF-8
RUN apt -qq update && \
apt -y install git \
netcat \
netbase \
curl \
python-minimal \
python-setuptools \
python-pip \
python-dev \
python-dateutil \
ca-certificates \
openstack-pkg-tools \
python-mysqldb \
gcc \
g++ \
make \
libffi-dev \
libssl-dev --no-install-recommends \
&& apt-get clean \
&& rm -rf \
/var/lib/apt/lists/* \
/tmp/* \
/var/tmp/* \
/usr/share/man \
/usr/share/doc \
/usr/share/doc-base
RUN pip install wheel
COPY . /tmp/ranger-agent
WORKDIR /tmp/ranger-agent
RUN pip install --default-timeout=100 -r requirements.txt
RUN python setup.py install
RUN cd ~/ \
&& rm -fr /tmp/ranger-agent \
&& mkdir /var/log/ranger-agent
# Create user aic-ord
RUN useradd -ms /bin/bash aic-ord
# Change permissions
RUN chown -R aic-ord: /home/aic-ord \
&& chown -R aic-ord: /etc/ord \
&& chown -R aic-ord: /var/log/ranger-agent
# Set work directory
USER aic-ord
WORKDIR /home/aic-ord/

View File

@ -15,11 +15,29 @@ Devstack Installation
Installation
------------
1. Clone the repo and go to the `tools` directory.
Clone the repo and go to the `tools` directory.
$ `git clone https://git.openstack.org/openstack/ranger-agent`
$ `cd ranger-agent/tools`
Docker Container:
-----------------
1. $ `cd ranger-agent`
2. $ `sudo docker build -t ranger-agent .`
3. $ `sudo docker run -h "ranger-agent" --net host -it --privileged ranger-agent bash`
Creating docker image and publish will be done by CICD jobs.For Refernce and validation manually image could push using..
a). $ `docker login <docker_user_id>`
b). $ `docker tag ranger-agent <docker_user_id>/ranger-agent:0.1.0`
c). $ `docker push <docker_user_id>/ranger-agent:0.1.0`
4. This docker container will be used by helm chart to deploy
Manual:
------
1. $ `cd ranger-agent/tools`
2. Run `./ranger-agent-db.sh` for setting up the database.

View File

@ -14,5 +14,5 @@ paste.app_factory = ord.api.app:app_factory
paste.filter_factory = keystonemiddleware.auth_token:filter_factory
[filter:request_id]
paste.filter_factory = oslo.middleware:RequestId.factory
paste.filter_factory = oslo_middleware:RequestId.factory

View File

@ -29,12 +29,12 @@ openstack_client_http_timeout = 360
https_insecure = False
[database]
db_connection = mysql://root:stack@localhost/ord?charset=utf8
db_connection = mysql://root:devstack@127.0.0.1/ord?charset=utf8
[oslo_messaging_rabbit]
rabbit_userid = stackrabbit
rabbit_password = stack
rabbit_hosts = localhost
rabbit_password = devstack
rabbit_hosts = 127.0.0.1
rabbit_port = 5672
[orm]

View File

@ -2,22 +2,22 @@
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
#
pbr!=0.7,<1.0,>=0.6
oslo.config>=1.9.3,<1.10.0
oslo.messaging>1.8.0,<1.9.0
oslo.serialization>=1.4.0,<1.5.0
pecan>=1.0.2
python-heatclient>=0.4.0
python-keystoneclient>=1.3.4
python-glanceclient>=0.17.3
pbr>=1.6
oslo.config>=3.14.0
oslo.messaging>=5.2.0
oslo.serialization>=1.10.0
oslo.db>=4.10.0,!=4.13.1,!=4.13.2
oslo.log>=1.14.0
oslo.utils>=3.16.0
pecan>=1.0.0,!=1.0.2,!=1.0.3,!=1.0.4
python-heatclient>=1.4.0 # Apache-2.0
python-glanceclient>=2.3.0,!=2.4.0 # Apache-2.0
python-keystoneclient>=2.0.0,!=2.1.0 # Apache-2.0
werkzeug>=0.11.5
eventlet!=0.17.0,>=0.16.1
oslo.db>=1.7.0,<1.8.0
oslo.log>=1.0.0,<1.1.0
oslo.utils>=1.4.0,<1.5.0
pbr!=0.7,<1.0,>=0.6
SQLAlchemy<=0.9.99,>=0.9.7
sqlalchemy-migrate>=0.9.5
eventlet!=0.18.3,>=0.18.2
SQLAlchemy>=1.0.10,<1.1.0
sqlalchemy-migrate>=0.9.6
lxml>=2.3
PasteDeploy>=1.5.0
enum34>=0.9.23
enum34;python_version=='2.7' or python_version=='2.6' or python_version=='3.3'

View File

@ -2,17 +2,16 @@
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
hacking<0.11,>=0.10.0
hacking>=0.11.0,<0.12 # Apache-2.0
coverage>=3.6
python-subunit>=0.0.18
sphinx!=1.2.0,!=1.3b1,<1.3,>=1.1.2
oslosphinx<2.6.0,>=2.5.0 # Apache-2.0
sphinx>=1.2.1,!=1.3b1,<1.3 # BSD
oslosphinx>=2.5.0,!=3.4.0 # Apache-2.0
oslotest>=1.10.0 # Apache-2.0
testrepository>=0.0.18
testscenarios>=0.4
testtools>=1.4.0
mock<1.1.0,>=1.0
mock>=2.0
discover
mox>=0.5.3
psycopg2
psycopg2>=2.5