summaryrefslogtreecommitdiffstats
path: root/compass-tasks-base/misc
diff options
context:
space:
mode:
authorHarry Huang <huangxiangyu5@huawei.com>2017-11-17 14:53:44 +0800
committerHarry Huang <huangxiangyu5@huawei.com>2017-12-21 16:36:30 +0800
commit8646b8d62cf4ca7b6bccae537a0c9e72ba45eab3 (patch)
tree73a9a983e0dd1423e9df928a78a5023a09d5a7f9 /compass-tasks-base/misc
parent6234176ae292a75dcda5520324cb7857d6105988 (diff)
Merge compass-tasks-osa and compass-tasks-k8s
JIRA: COMPASS-568 rename compass-tasks to compass-tasks-base. add both osa and k8s support in compass-tasks Change-Id: I438f5b17e509d4cb751ced0ffe640ec70899882f Signed-off-by: Harry Huang <huangxiangyu5@huawei.com>
Diffstat (limited to 'compass-tasks-base/misc')
-rw-r--r--compass-tasks-base/misc/Dockerfile53
-rw-r--r--compass-tasks-base/misc/compass_install.repo5
2 files changed, 58 insertions, 0 deletions
diff --git a/compass-tasks-base/misc/Dockerfile b/compass-tasks-base/misc/Dockerfile
new file mode 100644
index 0000000..ed47aea
--- /dev/null
+++ b/compass-tasks-base/misc/Dockerfile
@@ -0,0 +1,53 @@
+from centos:latest
+
+# repos
+COPY misc/compass_install.repo /etc/yum.repos.d/compass_install.repo
+
+RUN rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm && \
+ sed -i 's/^mirrorlist=https/mirrorlist=http/g' /etc/yum.repos.d/epel.repo && \
+ yum update -y
+
+# packages
+RUN yum --enablerepo=compass_install --nogpgcheck install -y python python-devel git amqp python-pip libffi-devel openssl-devel gcc python-setuptools MySQL-python supervisor redis sshpass python-keyczar vim ansible-2.2.1.0
+
+# code
+RUN mkdir -p /root/compass-tasks
+COPY . /root/compass-tasks
+RUN mkdir -p /root/compass-tasks/compass && \
+ touch /root/compass-tasks/compass/__init__.py
+RUN mv /root/compass-tasks/actions /root/compass-tasks/compass/ && \
+ mv /root/compass-tasks/apiclient /root/compass-tasks/compass/ && \
+ mv /root/compass-tasks/tasks /root/compass-tasks/compass/ && \
+ mv /root/compass-tasks/utils /root/compass-tasks/compass/ && \
+ mv /root/compass-tasks/deployment /root/compass-tasks/compass/ && \
+ mv /root/compass-tasks/db /root/compass-tasks/compass/ && \
+ mv /root/compass-tasks/hdsdiscovery /root/compass-tasks/compass/ && \
+ mv /root/compass-tasks/log_analyzor /root/compass-tasks/compass/
+
+# pip
+RUN easy_install --upgrade pip && \
+ pip install --upgrade pip && \
+ pip install --upgrade setuptools && \
+ pip install --upgrade Flask
+
+# conf
+RUN mkdir -p /etc/compass/ && \
+ mkdir -p /etc/compass/machine_list && \
+ mkdir -p /etc/compass/switch_list && \
+ #cp -rf /root/compass-tasks/conf/* /etc/compass/ && \
+ cd /root/compass-tasks && \
+ python setup.py install
+
+RUN mkdir -p /root/.ssh; \
+ echo "UserKnownHostsFile /dev/null" >> /root/.ssh/config; \
+ echo "StrictHostKeyChecking no" >> /root/.ssh/config
+
+COPY supervisord.conf /etc/supervisord.conf
+COPY start.sh /usr/local/bin/start.sh
+RUN mkdir -p /var/log/compass
+RUN mkdir -p /opt/ansible_callbacks
+#RUN git clone https://github.com/openstack-ansible/openstack-ansible-modules /opt/openstack-ansible-modules
+EXPOSE 6379
+VOLUME ["/var/ansible", "/etc/compass/machine_list", "/etc/compass/switch_list"]
+ENTRYPOINT ["/bin/bash", "-c"]
+CMD ["/usr/local/bin/start.sh"]
diff --git a/compass-tasks-base/misc/compass_install.repo b/compass-tasks-base/misc/compass_install.repo
new file mode 100644
index 0000000..6b97ed0
--- /dev/null
+++ b/compass-tasks-base/misc/compass_install.repo
@@ -0,0 +1,5 @@
+[compass_install]
+name=compass_repo
+baseurl=http://192.168.104.2:9999/download/compass_install/centos7/
+gpgcheck=0
+enabled=1