Difference between revisions of "Building Xenopsd"

From Xen
(Created page with "Xenopsd is the "domain management" component within the XCP toolstack. = Prerequisites = You will need: # the normal build tools (on Debian install "build-essentials") # the Xe…")
 
(Building the development version of xenopsd)
Line 4: Line 4:
   
 
You will need:
 
You will need:
# the normal build tools (on Debian install "build-essentials")
+
# the normal build tools (on Debian install "build-essentials git rsync wget")
 
# the Xen development headers (on Debian install "libxen-dev")
 
# the Xen development headers (on Debian install "libxen-dev")
 
# the [http://www.ocaml.org/ OCaml] compiler (at least version 3.12.1)
 
# the [http://www.ocaml.org/ OCaml] compiler (at least version 3.12.1)
 
# the OCaml package manager, [http://opam.ocamlpro.org/ OPAM]
 
# the OCaml package manager, [http://opam.ocamlpro.org/ OPAM]
   
  +
Assuming a Debian wheezy system (other systems may differ), first install the system packages:
$ sudo apt-get install build-essentials libxen-dev ocaml
 
  +
  +
$ sudo apt-get install build-essentials git rsync wget libxen-dev ocaml
  +
  +
Then install the OPAM tool:
  +
  +
$ wget http://github.com/OCamlPro/opam/archive/0.8.1.tar.gz
  +
$ tar -xvzf 0.8.1.tar.gz
  +
$ cd 0.8.1
  +
$ ./configure
  +
$ make
  +
$ sudo make install
  +
  +
Next initialise OPAM, this will read in the definitions of common OCaml packages.
  +
  +
$ opam init
  +
  +
Since OPAM packages are installed by default into a custom directory in $HOME/.opam, it's necessary to update some paths. The instructions will be printed to your terminal and typically look like the following:
  +
  +
To update $PATH, $MANPATH, $OCAML_TOPLEVEL_PATH, $CAML_LD_LIBRARY_PATH; you can now run:
  +
  +
$ which opam && eval `opam config -env`
  +
  +
and add this in your ~/.profile
  +
  +
  +
= Building xenopsd (and associated tools) =
  +
  +
To make building easy, the development versions of xenopsd (and associated tools) are packaged into OPAM packages in a custom repository. To build, first add this repository as a remote:
  +
  +
$ opam remote -add xen-dev git://github.com/xen-org/opam-repo-dev
  +
  +
The new packages found in this remote will be listed on your terminal and may be queried via "opam list". At the time of writing this list looked like:
  +
  +
The following NEW packages are available:
  +
- fd-send-recv.1.0.0
  +
- forkexecd.1.0.0
  +
- message_switch.1.0.0
  +
- shared-memory-ring.1.0.0
  +
- xcp.1.0.0
  +
- xen-api-client.1.0.0
  +
- xenctrl.4.1.0
  +
- xenops-cli.1.0.0
  +
- xenopsd.1.0.0
  +
- xenstore.2.0.0
  +
- xenstore_transport.1.0.0
  +
  +
Finally, to build xenopsd (and its CLI) and all their dependencies, use the following command:
  +
  +
$ opam install xenopsd xenops-cli
  +
  +
The xenospd binary will end up in .opam/system/bin and should be on your $PATH (if you followed the earlier instructions to update your environment)

Revision as of 10:32, 2 January 2013

Xenopsd is the "domain management" component within the XCP toolstack.

Prerequisites

You will need:

  1. the normal build tools (on Debian install "build-essentials git rsync wget")
  2. the Xen development headers (on Debian install "libxen-dev")
  3. the OCaml compiler (at least version 3.12.1)
  4. the OCaml package manager, OPAM

Assuming a Debian wheezy system (other systems may differ), first install the system packages:

 $ sudo apt-get install build-essentials git rsync wget libxen-dev ocaml

Then install the OPAM tool:

 $ wget http://github.com/OCamlPro/opam/archive/0.8.1.tar.gz
 $ tar -xvzf 0.8.1.tar.gz
 $ cd 0.8.1
 $ ./configure
 $ make
 $ sudo make install

Next initialise OPAM, this will read in the definitions of common OCaml packages.

 $ opam init

Since OPAM packages are installed by default into a custom directory in $HOME/.opam, it's necessary to update some paths. The instructions will be printed to your terminal and typically look like the following:

To update $PATH, $MANPATH, $OCAML_TOPLEVEL_PATH, $CAML_LD_LIBRARY_PATH; you can now run:
           
   $ which opam && eval `opam config -env`

and add this in your ~/.profile


Building xenopsd (and associated tools)

To make building easy, the development versions of xenopsd (and associated tools) are packaged into OPAM packages in a custom repository. To build, first add this repository as a remote:

 $ opam remote -add xen-dev git://github.com/xen-org/opam-repo-dev

The new packages found in this remote will be listed on your terminal and may be queried via "opam list". At the time of writing this list looked like:

The following NEW packages are available:
- fd-send-recv.1.0.0
- forkexecd.1.0.0
- message_switch.1.0.0
- shared-memory-ring.1.0.0
- xcp.1.0.0
- xen-api-client.1.0.0
- xenctrl.4.1.0
- xenops-cli.1.0.0
- xenopsd.1.0.0
- xenstore.2.0.0
- xenstore_transport.1.0.0

Finally, to build xenopsd (and its CLI) and all their dependencies, use the following command:

 $ opam install xenopsd xenops-cli

The xenospd binary will end up in .opam/system/bin and should be on your $PATH (if you followed the earlier instructions to update your environment)