From f3321ba90bed1a6eb06589c109cfe353fa9b317d Mon Sep 17 00:00:00 2001 From: ronivay Date: Tue, 13 Nov 2018 15:44:42 +0200 Subject: [PATCH] remove docker stuff from this repository to it's own repo --- README.md | 23 ++---------------- docker/Dockerfile | 55 ------------------------------------------- docker/monit-services | 14 ----------- xo-install.sh | 35 +-------------------------- 4 files changed, 3 insertions(+), 124 deletions(-) delete mode 100644 docker/Dockerfile delete mode 100644 docker/monit-services diff --git a/README.md b/README.md index eeefe01..9fbd75f 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ # In a nutshell -This repo consist of script to install and update [Xen Orchestra](https://xen-orchestra.com/#!/) and readymade files to create Docker image. +This repo consist of script to install and update [Xen Orchestra](https://xen-orchestra.com/#!/) for CentOS 7/Ubuntu 16/Debian 8 & 9 Installation is done using latest xo-server and xo-web sources. With this method Xen-Orchestra has all features unlocked which are normally available only with monthly fee. @@ -44,7 +44,7 @@ Tool makes some checks and offers options: - Installs Xen-Orchestra from latest sources (doesn't install any new packages) 3. Deploy container - - Offers options to build container locally or pull from dockerhub + - Offers options to pull ready docker image from dockerhub, also maintained by me 4. Rollback installation - Offers option to choose which installation to use from existing ones (if more than 1) @@ -54,25 +54,6 @@ notes: - If you choose to install with option 2, you need to take care that required packages are already installed - You can change xo-server and xo-web git branch/tag by editing xo-install.cfg $BRANCH variable -### docker -You can also build the docker image locally if you wish or pull it from [docker hub](https://hub.docker.com/r/ronivay/xen-orchestra/) without using the script. - -``` -docker build -t docker/. xen-orchestra -docker run -p 80:80 xen-orchestra -``` -or -``` -docker pull ronivay/xen-orchestra -docker run -p 80:80 ronivay/xen-orchestra -``` - -I suggest adding persistent data mounts for xo-server and redis by adding volume flags to commands above like so: - -``` -docker run -p 80:80 -v /path/to/xodata:/var/lib/xo-server -v /path/to/redisdata:/var/lib/redis xen-orchestra -``` - ## Notes Tool has been tested to work with following distros: diff --git a/docker/Dockerfile b/docker/Dockerfile deleted file mode 100644 index 8c942b3..0000000 --- a/docker/Dockerfile +++ /dev/null @@ -1,55 +0,0 @@ -FROM centos:latest - -MAINTAINER Roni Väyrynen - -# Install set of dependencies to support running Xen-Orchestra - -# Node v8 -RUN curl -s -L https://rpm.nodesource.com/setup_8.x | bash - - -# yarn for installing node packages -RUN curl -s -o /etc/yum.repos.d/yarn.repo https://dl.yarnpkg.com/rpm/yarn.repo -RUN yum -y install yarn - -# epel-release for various packages not available from base repo -RUN yum -y install epel-release - -# build dependencies, git for fetching source and redis server for storing data -RUN yum -y install gcc gcc-c++ make openssl-devel redis libpng-devel python git nfs-utils - -# libvhdi-tools for file-level restore -RUN rpm -ivh https://forensics.cert.org/cert-forensics-tools-release-el7.rpm -RUN yum --enablerepo=forensics install -y libvhdi-tools - -# monit to keep an eye on processes -RUN yum -y install monit -ADD monit-services /etc/monit.d/services - -# Fetch Xen-Orchestra sources from git stable branch -RUN git clone -b master https://github.com/vatesfr/xen-orchestra /etc/xen-orchestra - -# Run build tasks against sources -RUN cd /etc/xen-orchestra && yarn && yarn build - -# Install plugins -RUN find /etc/xen-orchestra/packages/ -maxdepth 1 -mindepth 1 -not -name "xo-server" -not -name "xo-web" -not -name "xo-server-cloud" -exec ln -s {} /etc/xen-orchestra/packages/xo-server/node_modules \; -RUN cd /etc/xen-orchestra && yarn && yarn build - -# Fix path for xo-web content in xo-server configuration -RUN sed -i "s/#'\/': '\/path\/to\/xo-web\/dist\//'\/': '..\/xo-web\/dist\//" /etc/xen-orchestra/packages/xo-server/sample.config.yaml - -# Move edited config sample to place -RUN mv /etc/xen-orchestra/packages/xo-server/sample.config.yaml /etc/xen-orchestra/packages/xo-server/.xo-server.yaml - -# Install forever for starting/stopping Xen-Orchestra -RUN npm install forever -g - -# Logging -RUN ln -sf /proc/1/fd/1 /var/log/redis/redis.log -RUN ln -sf /proc/1/fd/1 /var/log/xo-server.log - -WORKDIR /etc/xen-orchestra/xo-server - -EXPOSE 80 - -CMD ["/usr/bin/monit"] diff --git a/docker/monit-services b/docker/monit-services deleted file mode 100644 index 65dc448..0000000 --- a/docker/monit-services +++ /dev/null @@ -1,14 +0,0 @@ -set init - -check process xo-server with pidfile /var/run/xo-server.pid - depends on redis - start program = "/usr/bin/forever start -a --pidFile /var/run/xo-server.pid --sourceDir /etc/xen-orchestra/packages/xo-server -l /var/log/xo-server.log bin/xo-server" - stop program = "/usr/bin/forever stop /etc/xen-orchestra/packages/xo-server/bin/xo-server" - -check process redis with pidfile /var/run/redis_6379.pid - start program = "/usr/bin/redis-server /etc/redis.conf --daemonize yes" - stop program = "/usr/bin/redis-cli shutdown" - -check process rpcbind - matching "rpcbind" - start program = "/usr/sbin/rpcbind" diff --git a/xo-install.sh b/xo-install.sh index 1a46657..b6beda4 100755 --- a/xo-install.sh +++ b/xo-install.sh @@ -598,20 +598,6 @@ function CheckDocker { } -function BuildDockerImage { - - echo - docker build -t xen-orchestra $(dirname $0)/docker/. - echo - echo - echo "Image built. Run container:" - echo "docker run -itd -p 80:80 xen-orchestra" - echo - echo "If you want to persist xen-orchestra and redis data, use volume flags like:" - echo "docker run -itd -p 80:80 -v /path/to/data/xo-server:/var/lib/xo-server -v /path/to/data/redis:/var/lib/redis xen-orchestra" - -} 2>$LOGFILE - function PullDockerImage { echo @@ -710,26 +696,7 @@ read -p ": " option 3) CheckDocker echo - echo "Build image locally or fetch from docker hub?" - echo "1. Build" - echo "2. Pull" - echo "3. Cancel" - read -p ": " container - case $container in - 1) - BuildDockerImage - ;; - 2) - PullDockerImage - - ;; - 3) - exit 0 - ;; - *) - exit 0 - ;; - esac + PullDockerImage ;; 4) RollBackInstallation