remove docker stuff from this repository to it's own repo
This commit is contained in:
23
README.md
23
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:
|
||||
|
@@ -1,55 +0,0 @@
|
||||
FROM centos:latest
|
||||
|
||||
MAINTAINER Roni Väyrynen <roni@vayrynen.info>
|
||||
|
||||
# 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"]
|
@@ -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"
|
@@ -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
|
||||
|
Reference in New Issue
Block a user