17d70e9e79f932b56ceb065a87dc0fd0ca902088
[packages/precise/mcollective.git] / ext / solaris11 / README.md
1 Requirements
2 ------------
3
4 - Ruby (pkg install pkg:/runtime/ruby-18)
5 - Header files (pkg install system/header)
6 - GCC to install JSON (pkg install developer/gcc-3)
7 - Stomp: gem install stomp
8 - Ruby-JSON: gem install json
9
10 Installation
11 ------------
12
13 Clone the github repository and install as root:
14
15     $ cd marionette-collective
16     $ make -f ext/solaris11/Makefile install
17
18 This will use / as a default destination root directory.
19
20 IPS package
21 -----------
22
23 To create an IPS package, follow the excellent guide at:
24 http://www.neuhalfen.name/blog/2011/07/02/Solaris11-Packaging-IPS_simple_packages/
25
26 To create a basic IPS repository (and start the associated services):
27
28     # zfs create rpool/IPS
29     # zfs set atime=off rpool/IPS
30     # zfs set mountpoint=/IPS rpool/IPS
31     # mkdir /IPS/Solaris11
32     # svcadm enable application/pkg/server
33     # svccfg -s application/pkg/server setprop pkg/inst_root=/IPS/Solaris11
34     # svccfg -s application/pkg/server setprop pkg/readonly=false
35     # pkgrepo create /IPS/Solaris11/
36     # pkgrepo set -s /IPS/Solaris11 publisher/prefix=legrand.im
37     # pkgrepo -s /IPS/Solaris11 refresh
38     # svcadm refresh application/pkg/server
39     # svcadm enable application/pkg/server
40     # pkg set-publisher -O http://localhost:80 legrand.im
41
42 To create and send the package itself, from the guide above:
43
44     # mkdir ~/package
45     # cd <GITHUB>/marionette-collective
46     # cat Makefile | sed 's/DESTDIR=$/DESTDIR=~\/package/' > Makefile.package
47     # make -f ext/solaris11/Makefile.package install
48     # pkg install pkg:/file/gnu-findutils
49     # export ROOT=/
50     # export description="MCollective"
51     # export user="root"
52     # export group="root"
53     # cd ~/package
54     # cat > ../send.sh << "EOF"
55     #!/bin/sh
56     export PKGSEND="pkgsend -s http://localhost:80"
57     eval `$PKGSEND open mcollective@1.1-1`
58     $PKGSEND add license ./COPYING license=lorem_ipsum
59     $PKGSEND add set name=description value="${description}"
60     EOF
61     # gfind . -type d -not -name . -printf "\$PKGSEND add dir mode=%m owner=${user} group=${group} path=$ROOT/%h/%f \n"  >> ../send.sh
62     # gfind . -type f -not -name LICENSE   -printf "\$PKGSEND add file %h/%f mode=%m owner=${user} group=${group} path=$ROOT/%h/%f \n" >> ../send.sh
63     # gfind . -type l -not -name LICENSE   -printf "\$PKGSEND add link path=%h/%f target=%l \n" >> ../send.sh
64     # echo '$PKGSEND close' >> ../send.sh
65     # sh -x ../send.sh
66
67 The package can then be installed with:
68
69     # pkg install pkg://legrand.im/mcollective
70
71 Configuration
72 -------------
73
74 There is no packaged configuration; you can use the following example:
75
76     # cat > /etc/mcollective/client.cfg << "EOF"
77     topicprefix = /topic/
78     main_collective = mcollective
79     collectives = mcollective
80     libdir = /usr/share/mcollective/plugins
81     logfile = /dev/null
82     loglevel = info
83     # Plugins
84     securityprovider = psk
85     plugin.psk = unset
86     connector = stomp
87     plugin.stomp.host = mqserver
88     plugin.stomp.port = 6163
89     plugin.stomp.user = mcollective
90     plugin.stomp.password = changeme
91     # Facts
92     factsource = yaml
93     plugin.yaml = /etc/mcollective/facts.yaml
94     EOF
95
96 License
97 ------
98
99 http://creativecommons.org/publicdomain/zero/1.0/
100
101 To the extent possible under law, Mathieu Legrand has waived all copyright and related or
102 neighboring rights to this work. This work is published from: Singapore.
103
104