Clarification, update links, organize (#127)
* Clarification, update links, organize * add nfs warning, fix debian version
This commit is contained in:
parent
4670c393a9
commit
272565243d
@ -1,14 +1,16 @@
|
|||||||
|
|
||||||
|
|
||||||
# From the sources
|
# From the sources
|
||||||
|
|
||||||
**WARNING**: we don't make support for this manual installation. We cannot guarantee anything if used in production. Use it at your own risks.
|
**WARNING**: we don't provide support for this installation method. We cannot guarantee anything if it's used in production. Use it at your own risk.
|
||||||
|
|
||||||
**WARNING 2**: **It's impossible to predict the result of a build for any Node and NPM versions**. Please consider to use XOA before trying to play with the manual build, which can be difficult if you are not used to NodeJS and NPM.
|
**WARNING 2**: **It's impossible to predict the result of a build for any Node and NPM versions**. Please consider using XOA before trying to play with the manual build, which can be difficult if you are not used to NodeJS and NPM.
|
||||||
|
|
||||||
> Please take time to read it carefully.
|
> Please take time to read this guide carefully.
|
||||||
|
|
||||||
This installation is validated against a fresh Debian 8 (Jessie) 64 bits. It should be almost the same on others dpkg systems. For RPMs based OS, it should be close, because most of our dependencies came from NPM and not the OS itself.
|
This installation has been validated against a fresh Debian 8 (Jessie) x64 install. It should be nearly the same on other dpkg systems. For RPM based OS's, it should be close, as most of our dependencies come from NPM and not the OS itself.
|
||||||
|
|
||||||
As you may have seen, in other parts of the documentation, XO is composed of two parts: [xo-server](https://github.com/vatesfr/xen-orchestra/tree/master/packages/xo-server/) and [xo-web](https://github.com/vatesfr/xen-orchestra/tree/master/packages/xo-web/). They can be installed separately, even on different machines, but for the sake of simplicity we will set them up together.
|
As you may have seen,in other parts of the documentation, XO is composed of two parts: [xo-server](https://github.com/vatesfr/xen-orchestra/tree/master/packages/xo-server/) and [xo-web](https://github.com/vatesfr/xen-orchestra/tree/master/packages/xo-web/). They can be installed separately, even on different machines, but for the sake of simplicity we will set them up together.
|
||||||
|
|
||||||
## Packages and Pre-requisites
|
## Packages and Pre-requisites
|
||||||
|
|
||||||
@ -23,19 +25,19 @@ $ node -v
|
|||||||
v8.9.1
|
v8.9.1
|
||||||
```
|
```
|
||||||
|
|
||||||
See [this page](https://nodejs.org/en/download/package-manager/) for instructions on how to install Node.
|
If not, see [this page](https://nodejs.org/en/download/package-manager/) for instructions on how to install Node.
|
||||||
|
|
||||||
### Yarn
|
### Yarn
|
||||||
|
|
||||||
> Yarn is a package manager which offers more guarantees than npm.
|
> Yarn is a package manager that offers more guarantees than npm.
|
||||||
|
|
||||||
See [this page](https://yarnpkg.com/en/docs/install#linux-tab) for instructions on how to install Yarn.
|
See [this page](https://yarnpkg.com/en/docs/install#debian-stable) for instructions on how to install Yarn.
|
||||||
|
|
||||||
### Packages
|
### Packages
|
||||||
|
|
||||||
XO needs those packages to be built and installed. Redis is used as a database by XO.
|
XO needs the following packages to be installed. Redis is used as a database by XO.
|
||||||
|
|
||||||
Eg on Debian:
|
For example, on Debian:
|
||||||
|
|
||||||
```
|
```
|
||||||
apt-get install build-essential redis-server libpng-dev git python-minimal
|
apt-get install build-essential redis-server libpng-dev git python-minimal
|
||||||
@ -43,33 +45,31 @@ apt-get install build-essential redis-server libpng-dev git python-minimal
|
|||||||
|
|
||||||
## Fetching the Code
|
## Fetching the Code
|
||||||
|
|
||||||
You need to use the `git` source code manager:
|
You need to use the `git` source code manager to fetch the code. Ideally you should run XO as a non-root user, however if you don't run as root you will not be able to mount NFS remotes. As your chosen non-root (or root) user, run the following:
|
||||||
|
|
||||||
```
|
```
|
||||||
git clone -b master http://github.com/vatesfr/xen-orchestra
|
git clone -b master http://github.com/vatesfr/xen-orchestra
|
||||||
```
|
```
|
||||||
|
|
||||||
> Note: xo-server and xo-web have been migrated to the
|
> Note: xo-server and xo-web have been migrated to the [xen-orchestra](https://github.com/vatesfr/xen-orchestra) mono-repository.
|
||||||
[xen-orchestra](https://github.com/vatesfr/xen-orchestra)
|
|
||||||
mono-repository.
|
|
||||||
|
|
||||||
## Installing dependencies
|
## Installing dependencies
|
||||||
|
|
||||||
Once you have it, use `yarn`, as the non-root user owning the fetched code, to install the other dependencies. Into `xen-orchestra` directory and launch the following command:
|
Once you have it, use `yarn`, as the non-root (or root) user owning the fetched code, to install the other dependencies. Enter the `xen-orchestra` directory and run the following commands:
|
||||||
|
|
||||||
```
|
```
|
||||||
$ yarn
|
$ yarn
|
||||||
$ yarn build
|
$ yarn build
|
||||||
```
|
```
|
||||||
|
|
||||||
Then, you have to create a config file for `xo-server`:
|
Now you have to create a config file for `xo-server`:
|
||||||
|
|
||||||
```
|
```
|
||||||
$ cd packages/xo-server
|
$ cd packages/xo-server
|
||||||
$ cp sample.config.yaml .xo-server.yaml
|
$ cp sample.config.yaml .xo-server.yaml
|
||||||
```
|
```
|
||||||
|
|
||||||
Edit and uncomment it to have the right path to deliver `xo-web`, because `xo-server` embeds an HTTP server (we assume that `xen-orchestra` and `xo-web` are in the same directory). It's near the end of the file:
|
Edit and uncomment it to have the right path to serve `xo-web`, because `xo-server` embeds an HTTP server (we assume that `xen-orchestra` and `xo-web` are in the same directory). It's near the end of the file:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
mounts: '/': '../xo-web/dist/'
|
mounts: '/': '../xo-web/dist/'
|
||||||
@ -90,14 +90,25 @@ WebServer listening on localhost:80
|
|||||||
|
|
||||||
## Running XO
|
## Running XO
|
||||||
|
|
||||||
The sole part you have to launch is xo-server which is quite easy to do, just launch the `xo-server` script, which is in the root of xo-server's directory:
|
The only part you need to launch is xo-server which is quite easy to do. From the `xen-orchestra/packages/xo-server` directory, run the following:
|
||||||
|
|
||||||
```
|
```
|
||||||
$ yarn start
|
$ yarn start
|
||||||
```
|
```
|
||||||
That's it! Go on your browser to the xo-server IP address, and it works! :)
|
That's it! Use your browser to visit the xo-server IP address, and it works! :)
|
||||||
|
|
||||||
## Misc
|
## Updating
|
||||||
|
|
||||||
|
If you would like to update your current version, enter your `xen-orchestra` directory and run the following:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ git pull --ff-only
|
||||||
|
$ yarn
|
||||||
|
$ yarn build
|
||||||
|
```
|
||||||
|
Then restart Xen Orchestra if it was running.
|
||||||
|
|
||||||
|
## Always Running
|
||||||
|
|
||||||
- You can use [forever](https://github.com/nodejitsu/forever) to have the process always running:
|
- You can use [forever](https://github.com/nodejitsu/forever) to have the process always running:
|
||||||
|
|
||||||
@ -106,16 +117,17 @@ $ yarn global add forever
|
|||||||
$ forever start bin/xo-server
|
$ forever start bin/xo-server
|
||||||
```
|
```
|
||||||
|
|
||||||
- Or you can use [forever-service](https://github.com/zapty/forever-service) to install XO as a service, so it starts automatically at boot. As root:
|
- Or you can use [forever-service](https://github.com/zapty/forever-service) to install XO as a system service, so it starts automatically at boot. Run the following as root:
|
||||||
|
|
||||||
```
|
```
|
||||||
yarn global add forever
|
yarn global add forever
|
||||||
yarn global add forever-service
|
yarn global add forever-service
|
||||||
|
#Be sure to edit the path below to where your install is located!
|
||||||
cd /home/username/xen-orchestra/packages/xo-server/bin/
|
cd /home/username/xen-orchestra/packages/xo-server/bin/
|
||||||
forever-service install orchestra -r username -s xo-server
|
forever-service install orchestra -r username -s xo-server
|
||||||
```
|
```
|
||||||
|
|
||||||
Be sure to change the usernames to the user you are running xo-server as. The forever-service command must be run in the xo-server bin directory. Now you can manage the service, and it will start on boot with the machine:
|
The forever-service command above must be run in the xo-server bin directory. Now you can manage the service, and it will start on boot with the machine:
|
||||||
|
|
||||||
```
|
```
|
||||||
service orchestra start
|
service orchestra start
|
||||||
@ -128,17 +140,12 @@ If you need to delete the service:
|
|||||||
forever-service delete orchestra
|
forever-service delete orchestra
|
||||||
```
|
```
|
||||||
|
|
||||||
- If you want to update your current version, do this:
|
|
||||||
|
|
||||||
```
|
|
||||||
$ git pull --ff-only
|
|
||||||
$ yarn
|
|
||||||
$ yarn build
|
|
||||||
```
|
|
||||||
|
|
||||||
## Troubleshooting
|
## Troubleshooting
|
||||||
|
|
||||||
If you have problem during the building phase, follow these steps:
|
If you have problems during the building phase, follow these steps in your `xen-orchestra` directory:
|
||||||
|
|
||||||
1. `rm -rf node_modules`
|
1. `rm -rf node_modules`
|
||||||
1. `yarn`
|
1. `yarn`
|
||||||
|
Loading…
Reference in New Issue
Block a user