charmkit 0.4.1 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +41 -17
- data/examples/my-demo-charm/Gemfile +5 -0
- data/examples/my-demo-charm/Gemfile.lock +15 -0
- data/examples/my-demo-charm/README.md +45 -0
- data/examples/my-demo-charm/Rakefile +62 -0
- data/examples/my-demo-charm/config.yaml +21 -0
- data/examples/my-demo-charm/copyright +21 -0
- data/examples/my-demo-charm/hooks/config-changed +3 -0
- data/examples/my-demo-charm/hooks/install +8 -0
- data/examples/my-demo-charm/hooks/upgrade-charm +3 -0
- data/examples/my-demo-charm/icon.svg +322 -0
- data/examples/my-demo-charm/metadata.yaml +18 -0
- data/examples/my-demo-charm/tasks/vim.rb +8 -0
- data/examples/my-demo-charm/templates/acl.auth.php +10 -0
- data/examples/my-demo-charm/templates/local.php +15 -0
- data/examples/my-demo-charm/templates/plugins.local.php +12 -0
- data/examples/my-demo-charm/templates/users.auth.php +11 -0
- data/examples/my-demo-charm/templates/vhost.conf +42 -0
- data/lib/charmkit/helpers/runner.rb +17 -0
- data/lib/charmkit/version.rb +1 -1
- data/lib/charmkit.rb +2 -4
- metadata +21 -9
- data/examples/Charmkitfile +0 -66
- data/examples/basic.rb +0 -6
- data/examples/demo/lib/install.rb +0 -30
- data/examples/plugin_loader.rb +0 -1
- data/examples/template.rb +0 -4
- data/examples/templates/user_auth.txt +0 -1
- /data/examples/{demo → my-demo-charm}/readme +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d00fbd867145c222acc4d9352a4969d0aa405257
|
4
|
+
data.tar.gz: 1e6a86849fe915d2b18ee28136d1eff6a9f27995
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e7d99c2a2dbba161818f949b1e739787e03a322018ff645255cf1a226189360d91f7df3fc403f2d4e3e7f54d3406f65d7c20e622ec9b013b1d59517cf3739c29
|
7
|
+
data.tar.gz: 5f13cbc2404d7789de62bee4d23c59fc966b5b0c9180e853c5c7e19da8a44c1c4062c6b890a78c2ea962be12ee8a72cc5dfe2faf4669a5e387bb914a516be417
|
data/README.md
CHANGED
@@ -28,16 +28,15 @@ In **hooks/install**:
|
|
28
28
|
#!/bin/sh
|
29
29
|
|
30
30
|
apt-get update
|
31
|
-
apt-get install -qyf ruby --no-install-recommends
|
32
|
-
gem install bundler
|
31
|
+
apt-get install -qyf ruby bundler --no-install-recommends
|
33
32
|
|
34
33
|
bundle install --local --quiet
|
35
34
|
|
36
|
-
# Runs the lib/install.rb hook
|
37
35
|
bundle exec rake dokuwiki:install
|
38
36
|
```
|
39
37
|
|
40
|
-
In other hooks call
|
38
|
+
In other hooks call the relevant rake tasks, for example, in
|
39
|
+
**hooks/config-changed**:
|
41
40
|
|
42
41
|
```
|
43
42
|
#!/bin/sh
|
@@ -51,8 +50,6 @@ Same for **hooks/upgrade-charm**
|
|
51
50
|
#!/bin/sh
|
52
51
|
|
53
52
|
bundle exec rake dokuwiki:install
|
54
|
-
bundle exec rake dokuwiki:config_changed
|
55
|
-
|
56
53
|
```
|
57
54
|
|
58
55
|
## Writing Charmkit style hooks
|
@@ -63,21 +60,13 @@ All Charmkit hooks will reside in a normal **Rakefile**.
|
|
63
60
|
|
64
61
|
```ruby
|
65
62
|
require 'charmkit'
|
63
|
+
require 'charmkit/plugins/nginx'
|
64
|
+
require 'charmkit/plugins/php'
|
66
65
|
|
67
66
|
namespace :dokuwiki do
|
68
67
|
|
69
|
-
desc "Install required apt packages"
|
70
|
-
task :install_deps do
|
71
|
-
pkgs = [
|
72
|
-
'nginx-full', 'php-fpm', 'php-cgi', 'php-curl', 'php-gd', 'php-json',
|
73
|
-
'php-mcrypt', 'php-readline', 'php-mbstring', 'php-xml'
|
74
|
-
]
|
75
|
-
`apt-get update`
|
76
|
-
`apt-get install -qyf #{pkgs.join(' ')}`
|
77
|
-
end
|
78
|
-
|
79
68
|
desc "Install Dokuwiki"
|
80
|
-
task :install => [:
|
69
|
+
task :install => ["nginx:install", "php:install"] do
|
81
70
|
app_path = `config-get app_path`
|
82
71
|
resource_path = `resource-get stable-release`
|
83
72
|
hook_path = ENV['JUJU_CHARM_DIR']
|
@@ -130,6 +119,41 @@ end
|
|
130
119
|
The core of Charmkit contains a few helpers such as template rendering but
|
131
120
|
otherwise kept relatively small.
|
132
121
|
|
122
|
+
**Charmkit** does have a sense of "plugins" which are really **rake** tasks that
|
123
|
+
reside in *charmkit/plugin/{name}* as seen in the example syntax above.
|
124
|
+
|
125
|
+
## Using local plugins
|
126
|
+
|
127
|
+
In addition to the plugins(read: rake tasks) you can add your own to the charm
|
128
|
+
itself. To add a task either create a directory inside your charm (eg.
|
129
|
+
**tasks**) and name the file something relvant. For example, to create a plugin
|
130
|
+
that will install **vim** you would do the following inside your charm directory:
|
131
|
+
|
132
|
+
Create a file **tasks/vim.rb** with the below syntax:
|
133
|
+
|
134
|
+
```ruby
|
135
|
+
namespace :vim do
|
136
|
+
desc "install vim"
|
137
|
+
task :install do
|
138
|
+
system("apt-get install -qyf vim")
|
139
|
+
end
|
140
|
+
end
|
141
|
+
```
|
142
|
+
|
143
|
+
And in your **Rakefile** include it in using the **require_relative** syntax:
|
144
|
+
|
145
|
+
```ruby
|
146
|
+
require 'charmkit'
|
147
|
+
require_relative 'tasks/vim'
|
148
|
+
```
|
149
|
+
|
150
|
+
Now you can install **vim** with the rake command or utilize the tasks inside
|
151
|
+
your **Rakefile**:
|
152
|
+
|
153
|
+
```
|
154
|
+
bundle exec rake vim:install
|
155
|
+
```
|
156
|
+
|
133
157
|
## Packaging the Charm
|
134
158
|
|
135
159
|
You'll want to make sure that any Ruby gems used are packaged with your charm so
|
@@ -0,0 +1,45 @@
|
|
1
|
+
# Overview
|
2
|
+
|
3
|
+
DokuWiki is a simple to use and highly versatile Open Source wiki software that
|
4
|
+
doesn't require a database. It is loved by users for its clean and readable
|
5
|
+
syntax. The ease of maintenance, backup and integration makes it an
|
6
|
+
administrator's favorite. Built in access controls and authentication connectors
|
7
|
+
make DokuWiki especially useful in the enterprise context and the large number
|
8
|
+
of plugins contributed by its vibrant community allow for a broad range of use
|
9
|
+
cases beyond a traditional wiki.
|
10
|
+
|
11
|
+
# Usage
|
12
|
+
|
13
|
+
$ juju deploy cs:~adam-stokes/dokuwiki
|
14
|
+
|
15
|
+
## Login
|
16
|
+
|
17
|
+
Initial login and password are
|
18
|
+
|
19
|
+
username: admin
|
20
|
+
password: password
|
21
|
+
|
22
|
+
# Developing
|
23
|
+
|
24
|
+
## Setting up
|
25
|
+
|
26
|
+
As long as you have ruby and bundler installed you can do the following:
|
27
|
+
|
28
|
+
```
|
29
|
+
bundle install
|
30
|
+
bundle exec rake -T
|
31
|
+
```
|
32
|
+
|
33
|
+
All tasks are kept in **Rakefile** and are called via **hooks/{hook-name}**.
|
34
|
+
|
35
|
+
# Author
|
36
|
+
|
37
|
+
Adam Stokes <adam.stokes@ubuntu.com>
|
38
|
+
|
39
|
+
# Copyright
|
40
|
+
|
41
|
+
2016 Adam Stokes
|
42
|
+
|
43
|
+
# License
|
44
|
+
|
45
|
+
MIT
|
@@ -0,0 +1,62 @@
|
|
1
|
+
# The below requires will pull in charmkit and its nginx and php plugins
|
2
|
+
# which are provided with the library.
|
3
|
+
require 'charmkit'
|
4
|
+
require 'charmkit/plugins/nginx'
|
5
|
+
require 'charmkit/plugins/php'
|
6
|
+
|
7
|
+
# The below require_relative will load a local task from tasks/vim.rb
|
8
|
+
require_relative "tasks/vim.rb"
|
9
|
+
|
10
|
+
namespace :dokuwiki do
|
11
|
+
|
12
|
+
desc "Install Dokuwiki"
|
13
|
+
# Notice that I set task dependencies on nginx, php, AND vim
|
14
|
+
# so that they get installed prior to installing dokuwiki
|
15
|
+
task :install => ["nginx:install", "php:install", "vim:install"] do
|
16
|
+
app_path = `config-get app_path`.chomp
|
17
|
+
resource_path = `resource-get stable-release`.chomp
|
18
|
+
hook_path = ENV['JUJU_CHARM_DIR']
|
19
|
+
|
20
|
+
mkdir_p app_path unless Dir.exists? app_path
|
21
|
+
|
22
|
+
`tar xf #{resource_path} -C #{app_path} --strip-components=1`
|
23
|
+
cp "#{hook_path}/templates/acl.auth.php", "#{app_path}/conf/acl.auth.php"
|
24
|
+
cp "#{hook_path}/templates/local.php", "#{app_path}/conf/local.php"
|
25
|
+
cp "#{hook_path}/templates/plugins.local.php", "#{app_path}/conf/plugin.local.php"
|
26
|
+
|
27
|
+
version = File.read "#{app_path}/VERSION"
|
28
|
+
`application-version-set '#{version}'`
|
29
|
+
`status-set active "Dokuwiki Install finished."`
|
30
|
+
end
|
31
|
+
|
32
|
+
desc "Configure Dokuwiki"
|
33
|
+
task :config_changed do
|
34
|
+
app_path = `config-get app_path`.chomp
|
35
|
+
hook_path = ENV['JUJU_CHARM_DIR']
|
36
|
+
|
37
|
+
admin_user = `config-get admin_user`.chomp
|
38
|
+
admin_password = `config-get admin_password`.chomp
|
39
|
+
admin_name = `config-get admin_name`.chomp
|
40
|
+
admin_email = `config-get admin_email`.chomp
|
41
|
+
template "#{hook_path}/templates/users.auth.php",
|
42
|
+
"#{app_path}/conf/users.auth.php",
|
43
|
+
admin_user: admin_user,
|
44
|
+
admin_password: admin_password,
|
45
|
+
admin_name: admin_name,
|
46
|
+
admin_email: admin_email
|
47
|
+
|
48
|
+
public_address = `unit-get public-address`.chomp
|
49
|
+
template "#{hook_path}/templates/vhost.conf",
|
50
|
+
"/etc/nginx/sites-enabled/default",
|
51
|
+
public_address: public_address,
|
52
|
+
app_path: app_path
|
53
|
+
|
54
|
+
chown_R 'www-data', 'www-data', app_path
|
55
|
+
|
56
|
+
`systemctl restart php7.0-fpm`
|
57
|
+
`systemctl restart nginx`
|
58
|
+
`status-set active "Ready"`
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
task :default => 'dokuwiki:install'
|
@@ -0,0 +1,21 @@
|
|
1
|
+
options:
|
2
|
+
app_path:
|
3
|
+
type: string
|
4
|
+
default: "/srv/app"
|
5
|
+
description: "Where Dokuwiki will be installed"
|
6
|
+
admin_user:
|
7
|
+
type: string
|
8
|
+
default: admin
|
9
|
+
description: "Admin username (default: admin)"
|
10
|
+
admin_password:
|
11
|
+
type: string
|
12
|
+
default: "5f4dcc3b5aa765d61d8327deb882cf99"
|
13
|
+
description: "Admin password md5 hash format (default password: password)"
|
14
|
+
admin_name:
|
15
|
+
type: string
|
16
|
+
default: "The Admin"
|
17
|
+
description: Admin name
|
18
|
+
admin_email:
|
19
|
+
type: string
|
20
|
+
default: "admin@example.com"
|
21
|
+
description: Admin email
|
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2016 Adam Stokes <adam.stokes@ubuntu.com>
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
@@ -0,0 +1,322 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
2
|
+
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
3
|
+
|
4
|
+
<svg
|
5
|
+
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
6
|
+
xmlns:cc="http://creativecommons.org/ns#"
|
7
|
+
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
8
|
+
xmlns:svg="http://www.w3.org/2000/svg"
|
9
|
+
xmlns="http://www.w3.org/2000/svg"
|
10
|
+
xmlns:xlink="http://www.w3.org/1999/xlink"
|
11
|
+
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
12
|
+
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
13
|
+
width="96"
|
14
|
+
height="96"
|
15
|
+
id="svg6517"
|
16
|
+
version="1.1"
|
17
|
+
inkscape:version="0.91 r13725"
|
18
|
+
sodipodi:docname="icon.svg">
|
19
|
+
<defs
|
20
|
+
id="defs6519">
|
21
|
+
<linearGradient
|
22
|
+
id="Background">
|
23
|
+
<stop
|
24
|
+
id="stop4178"
|
25
|
+
offset="0"
|
26
|
+
style="stop-color:#b8b8b8;stop-opacity:1" />
|
27
|
+
<stop
|
28
|
+
id="stop4180"
|
29
|
+
offset="1"
|
30
|
+
style="stop-color:#c9c9c9;stop-opacity:1" />
|
31
|
+
</linearGradient>
|
32
|
+
<filter
|
33
|
+
style="color-interpolation-filters:sRGB;"
|
34
|
+
inkscape:label="Inner Shadow"
|
35
|
+
id="filter1121">
|
36
|
+
<feFlood
|
37
|
+
flood-opacity="0.59999999999999998"
|
38
|
+
flood-color="rgb(0,0,0)"
|
39
|
+
result="flood"
|
40
|
+
id="feFlood1123" />
|
41
|
+
<feComposite
|
42
|
+
in="flood"
|
43
|
+
in2="SourceGraphic"
|
44
|
+
operator="out"
|
45
|
+
result="composite1"
|
46
|
+
id="feComposite1125" />
|
47
|
+
<feGaussianBlur
|
48
|
+
in="composite1"
|
49
|
+
stdDeviation="1"
|
50
|
+
result="blur"
|
51
|
+
id="feGaussianBlur1127" />
|
52
|
+
<feOffset
|
53
|
+
dx="0"
|
54
|
+
dy="2"
|
55
|
+
result="offset"
|
56
|
+
id="feOffset1129" />
|
57
|
+
<feComposite
|
58
|
+
in="offset"
|
59
|
+
in2="SourceGraphic"
|
60
|
+
operator="atop"
|
61
|
+
result="composite2"
|
62
|
+
id="feComposite1131" />
|
63
|
+
</filter>
|
64
|
+
<filter
|
65
|
+
style="color-interpolation-filters:sRGB;"
|
66
|
+
inkscape:label="Drop Shadow"
|
67
|
+
id="filter950">
|
68
|
+
<feFlood
|
69
|
+
flood-opacity="0.25"
|
70
|
+
flood-color="rgb(0,0,0)"
|
71
|
+
result="flood"
|
72
|
+
id="feFlood952" />
|
73
|
+
<feComposite
|
74
|
+
in="flood"
|
75
|
+
in2="SourceGraphic"
|
76
|
+
operator="in"
|
77
|
+
result="composite1"
|
78
|
+
id="feComposite954" />
|
79
|
+
<feGaussianBlur
|
80
|
+
in="composite1"
|
81
|
+
stdDeviation="1"
|
82
|
+
result="blur"
|
83
|
+
id="feGaussianBlur956" />
|
84
|
+
<feOffset
|
85
|
+
dx="0"
|
86
|
+
dy="1"
|
87
|
+
result="offset"
|
88
|
+
id="feOffset958" />
|
89
|
+
<feComposite
|
90
|
+
in="SourceGraphic"
|
91
|
+
in2="offset"
|
92
|
+
operator="over"
|
93
|
+
result="composite2"
|
94
|
+
id="feComposite960" />
|
95
|
+
</filter>
|
96
|
+
<clipPath
|
97
|
+
clipPathUnits="userSpaceOnUse"
|
98
|
+
id="clipPath873">
|
99
|
+
<g
|
100
|
+
transform="matrix(0,-0.66666667,0.66604479,0,-258.25992,677.00001)"
|
101
|
+
id="g875"
|
102
|
+
inkscape:label="Layer 1"
|
103
|
+
style="fill:#ff00ff;fill-opacity:1;stroke:none;display:inline">
|
104
|
+
<path
|
105
|
+
style="fill:#ff00ff;fill-opacity:1;stroke:none;display:inline"
|
106
|
+
d="m 46.702703,898.22775 50.594594,0 C 138.16216,898.22775 144,904.06497 144,944.92583 l 0,50.73846 c 0,40.86071 -5.83784,46.69791 -46.702703,46.69791 l -50.594594,0 C 5.8378378,1042.3622 0,1036.525 0,995.66429 L 0,944.92583 C 0,904.06497 5.8378378,898.22775 46.702703,898.22775 Z"
|
107
|
+
id="path877"
|
108
|
+
inkscape:connector-curvature="0"
|
109
|
+
sodipodi:nodetypes="sssssssss" />
|
110
|
+
</g>
|
111
|
+
</clipPath>
|
112
|
+
<filter
|
113
|
+
inkscape:collect="always"
|
114
|
+
id="filter891"
|
115
|
+
inkscape:label="Badge Shadow">
|
116
|
+
<feGaussianBlur
|
117
|
+
inkscape:collect="always"
|
118
|
+
stdDeviation="0.71999962"
|
119
|
+
id="feGaussianBlur893" />
|
120
|
+
</filter>
|
121
|
+
</defs>
|
122
|
+
<sodipodi:namedview
|
123
|
+
id="base"
|
124
|
+
pagecolor="#ffffff"
|
125
|
+
bordercolor="#666666"
|
126
|
+
borderopacity="1.0"
|
127
|
+
inkscape:pageopacity="0.0"
|
128
|
+
inkscape:pageshadow="2"
|
129
|
+
inkscape:zoom="1"
|
130
|
+
inkscape:cx="39.339828"
|
131
|
+
inkscape:cy="216.87971"
|
132
|
+
inkscape:document-units="px"
|
133
|
+
inkscape:current-layer="layer1"
|
134
|
+
showgrid="false"
|
135
|
+
fit-margin-top="0"
|
136
|
+
fit-margin-left="0"
|
137
|
+
fit-margin-right="0"
|
138
|
+
fit-margin-bottom="0"
|
139
|
+
inkscape:window-width="1920"
|
140
|
+
inkscape:window-height="1043"
|
141
|
+
inkscape:window-x="1914"
|
142
|
+
inkscape:window-y="0"
|
143
|
+
inkscape:window-maximized="1"
|
144
|
+
showborder="true"
|
145
|
+
showguides="false"
|
146
|
+
inkscape:guide-bbox="true"
|
147
|
+
inkscape:showpageshadow="false"
|
148
|
+
inkscape:snap-bbox="true">
|
149
|
+
<inkscape:grid
|
150
|
+
type="xygrid"
|
151
|
+
id="grid821"
|
152
|
+
empspacing="5"
|
153
|
+
visible="true"
|
154
|
+
enabled="true"
|
155
|
+
snapvisiblegridlinesonly="true" />
|
156
|
+
<sodipodi:guide
|
157
|
+
orientation="1,0"
|
158
|
+
position="16,48"
|
159
|
+
id="guide823" />
|
160
|
+
<sodipodi:guide
|
161
|
+
orientation="0,1"
|
162
|
+
position="64,80"
|
163
|
+
id="guide825" />
|
164
|
+
<sodipodi:guide
|
165
|
+
orientation="1,0"
|
166
|
+
position="80,40"
|
167
|
+
id="guide827" />
|
168
|
+
<sodipodi:guide
|
169
|
+
orientation="0,1"
|
170
|
+
position="64,16"
|
171
|
+
id="guide829" />
|
172
|
+
</sodipodi:namedview>
|
173
|
+
<metadata
|
174
|
+
id="metadata6522">
|
175
|
+
<rdf:RDF>
|
176
|
+
<cc:Work
|
177
|
+
rdf:about="">
|
178
|
+
<dc:format>image/svg+xml</dc:format>
|
179
|
+
<dc:type
|
180
|
+
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
181
|
+
<dc:title />
|
182
|
+
</cc:Work>
|
183
|
+
</rdf:RDF>
|
184
|
+
</metadata>
|
185
|
+
<g
|
186
|
+
inkscape:label="BACKGROUND"
|
187
|
+
inkscape:groupmode="layer"
|
188
|
+
id="layer1"
|
189
|
+
transform="translate(268,-635.29076)"
|
190
|
+
style="display:inline">
|
191
|
+
<path
|
192
|
+
style="fill:#262a2d;fill-opacity:1;stroke:none;display:inline;filter:url(#filter1121)"
|
193
|
+
d="m -268,700.15563 0,-33.72973 c 0,-27.24324 3.88785,-31.13513 31.10302,-31.13513 l 33.79408,0 c 27.21507,0 31.1029,3.89189 31.1029,31.13513 l 0,33.72973 c 0,27.24325 -3.88783,31.13514 -31.1029,31.13514 l -33.79408,0 C -264.11215,731.29077 -268,727.39888 -268,700.15563 Z"
|
194
|
+
id="path6455"
|
195
|
+
inkscape:connector-curvature="0"
|
196
|
+
sodipodi:nodetypes="sssssssss" />
|
197
|
+
<g
|
198
|
+
style="opacity:0.7"
|
199
|
+
id="g11"
|
200
|
+
transform="matrix(0.62044056,0,0,0.62044056,-314.18126,593.62097)">
|
201
|
+
<rect
|
202
|
+
style="fill:#dcf0f0"
|
203
|
+
x="112.197"
|
204
|
+
y="168.302"
|
205
|
+
width="31.702999"
|
206
|
+
height="15.852"
|
207
|
+
id="rect13" />
|
208
|
+
<rect
|
209
|
+
style="fill:#dcf0f0"
|
210
|
+
x="159.75"
|
211
|
+
y="168.302"
|
212
|
+
width="31.683001"
|
213
|
+
height="15.852"
|
214
|
+
id="rect15" />
|
215
|
+
<rect
|
216
|
+
style="fill:#dcf0f0"
|
217
|
+
x="112.173"
|
218
|
+
y="136.599"
|
219
|
+
width="79.269997"
|
220
|
+
height="15.852"
|
221
|
+
id="rect17" />
|
222
|
+
<rect
|
223
|
+
style="fill:#dcf0f0"
|
224
|
+
x="112.197"
|
225
|
+
y="104.898"
|
226
|
+
width="47.558998"
|
227
|
+
height="15.851"
|
228
|
+
id="rect19" />
|
229
|
+
<rect
|
230
|
+
style="fill:#dcf0f0"
|
231
|
+
x="175.60201"
|
232
|
+
y="104.898"
|
233
|
+
width="15.851"
|
234
|
+
height="15.851"
|
235
|
+
id="rect21" />
|
236
|
+
</g>
|
237
|
+
<image
|
238
|
+
width="70"
|
239
|
+
height="70"
|
240
|
+
preserveAspectRatio="none"
|
241
|
+
xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAADAFBMVEVNbjAsNlKaPjNnYjJ8QlG9 PkXpAAVIPSKAelxrOB7PAwvoAAV0ajdTTj04S2hsZko9RyZTTTDiAARwbHJhXWU6VXA0WoB3dHtL TDuEf4I5UmRUVGMyLh+YkXRBPChVTTdLSVU1MSI9OCqTjpIoHTYsJ0M7O1IjHx4rJx1KapMkKDVK N0okICIzSWQ+ZowAAACkuaqQ0GSiva7jbUmUXy5rqJrP47+AqIO5oT0kr1qlm1GLu5O9qlzBloVt qE/UTkaIqm3ajGfPqZToumZzXC3DqESQf014eTfcw1LuV1AgSweUyKLbVy70yLa80VXTeVjX7NY+ rWC2fnLC2MWup4ZBOCWnkjePfjTst5innH7we3C5spBswocsdiHyo5VlLxjWw2pzw4yFRCbe1a5l qHXtOjZuaFkQvDrz2F8KsDHsHh8cgx4adxzVXDDvcmoHiBng8N3q0XPKwZxueF/xkITEXjrMakTv YVlkv4OS0qDBUS/GRCVJuW7128imQiS1SyuNNBf37N1vYUXa2L7bdUXV6c3Oyq6v3pTXZDdQcDaq uroAmB653busp5U2bi3ehFOVq7UexUTF5Md/e2ShnZTgkWTimG0BpigZtzpmja3zsqAuwkWh1KiB zJVoQiiAnrK0PyL++NtwzmPPRSVxKQ5JyFN5yZHvhnvi3saJo7RizFufs7ippaOzv7vs5cNWyVfs 7NapOh/dfUvl3rygmojJwbz48ObZbD7j59Sa14Cq2rXdiVuzr5+Jz5s8xk3lpX+l2oju6MrjnXbn rYvZ2MbGzMC0sK3h2tFwk66P1HfOysYBxD7q5t+B0WyWk4K8QiPr7ujv5bwAvjXS0sDu7+K/vK3S 1s307uLz6Nzx8erj5uHx8+++xbx5mbD57sX38NacNRrt4dPm6eUAsC6Khm749vCNinoAtzH+++X/ /PH88cnU2tH489f888/w5NbZ3tXg493//ff59un9+Ozd4Nr28NP///78+vPy6L/z6sP17c749N72 79D17cz068j59eJDZRzfAAAAMHRSTlPpdfrY0fsd3u7zVm7q4pTVyMGS59haPe629XTKcv6q/saC l/xmiakwWQwcEUIGAQC57bJoAAALH0lEQVR4AYyTW0gb+ReAfeilakurLbTl76Varf411vfSpbSK i2ARRKlW0KDYh0AFXS9gMBotUgLSUNtCfMiFBJKQJhiTXkBBokkdluIgs1nnYWacQJAkOGFJEHLJ jHt+Scf0pbAfEUH4vnNyxilo/g/cb2psqJPUl1VVV9y6ekUCf6m7VlJdJmkGfh1oamwECVm3Sq5e Cpb39Y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aHp/hs3a7o0pV4FaMPFyKqYzZJJWEX0DPM5N4IME0yvl4nj9xAYoH9vaqi/Xm5cAzoxEV+P+KCV ZiYnmeCGEzuLFgKkFDiwrMAtFgkYYCgcHhqt6dVorgMdLSKx6ou4cbaQxFqoEPzpQCia5kV/0LIZ BmLvUB4gvN3/leoLQHeVJIlyeCrpXognIYBQ0JcI9+QN7QwQayNj067w0ING6F8DIM2SyNMBHGup a7rZHA3JfUqiA+6NqvbGWlVt/ewMXNHY9NDQNAzwJaAdczZUt9+sqe3q1jRiFGwhjjvrmhpr5WVp etU1t4BY7oclKgNcA3pae7rUxZNQqWoZMupsaIJlqaAMUas1vSogtH0Pvm5Uab4AKIEfAdDdXA1z d6vhWxV01Rr4KhG3GmGgSh/yP0awuzrIDDAQAAAAAElFTkSuQmCC "
|
242
|
+
id="image3437"
|
243
|
+
x="-254"
|
244
|
+
y="648.29077" />
|
245
|
+
</g>
|
246
|
+
<g
|
247
|
+
inkscape:groupmode="layer"
|
248
|
+
id="layer3"
|
249
|
+
inkscape:label="PLACE YOUR PICTOGRAM HERE"
|
250
|
+
style="display:inline" />
|
251
|
+
<g
|
252
|
+
inkscape:groupmode="layer"
|
253
|
+
id="layer2"
|
254
|
+
inkscape:label="BADGE"
|
255
|
+
style="display:none"
|
256
|
+
sodipodi:insensitive="true">
|
257
|
+
<g
|
258
|
+
style="display:inline"
|
259
|
+
transform="translate(-340.00001,-581)"
|
260
|
+
id="g4394"
|
261
|
+
clip-path="none">
|
262
|
+
<g
|
263
|
+
id="g855">
|
264
|
+
<g
|
265
|
+
inkscape:groupmode="maskhelper"
|
266
|
+
id="g870"
|
267
|
+
clip-path="url(#clipPath873)"
|
268
|
+
style="opacity:0.6;filter:url(#filter891)">
|
269
|
+
<path
|
270
|
+
transform="matrix(1.4999992,0,0,1.4999992,-29.999795,-237.54282)"
|
271
|
+
d="m 264,552.36218 a 12,12 0 0 1 -12,12 12,12 0 0 1 -12,-12 12,12 0 0 1 12,-12 12,12 0 0 1 12,12 z"
|
272
|
+
sodipodi:ry="12"
|
273
|
+
sodipodi:rx="12"
|
274
|
+
sodipodi:cy="552.36218"
|
275
|
+
sodipodi:cx="252"
|
276
|
+
id="path844"
|
277
|
+
style="color:#000000;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
|
278
|
+
sodipodi:type="arc" />
|
279
|
+
</g>
|
280
|
+
<g
|
281
|
+
id="g862">
|
282
|
+
<path
|
283
|
+
sodipodi:type="arc"
|
284
|
+
style="color:#000000;fill:#f5f5f5;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
|
285
|
+
id="path4398"
|
286
|
+
sodipodi:cx="252"
|
287
|
+
sodipodi:cy="552.36218"
|
288
|
+
sodipodi:rx="12"
|
289
|
+
sodipodi:ry="12"
|
290
|
+
d="m 264,552.36218 a 12,12 0 0 1 -12,12 12,12 0 0 1 -12,-12 12,12 0 0 1 12,-12 12,12 0 0 1 12,12 z"
|
291
|
+
transform="matrix(1.4999992,0,0,1.4999992,-29.999795,-238.54282)" />
|
292
|
+
<path
|
293
|
+
transform="matrix(1.25,0,0,1.25,33,-100.45273)"
|
294
|
+
d="m 264,552.36218 a 12,12 0 0 1 -12,12 12,12 0 0 1 -12,-12 12,12 0 0 1 12,-12 12,12 0 0 1 12,12 z"
|
295
|
+
sodipodi:ry="12"
|
296
|
+
sodipodi:rx="12"
|
297
|
+
sodipodi:cy="552.36218"
|
298
|
+
sodipodi:cx="252"
|
299
|
+
id="path4400"
|
300
|
+
style="color:#000000;fill:#dd4814;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
|
301
|
+
sodipodi:type="arc" />
|
302
|
+
<path
|
303
|
+
sodipodi:type="star"
|
304
|
+
style="color:#000000;fill:#f5f5f5;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
|
305
|
+
id="path4459"
|
306
|
+
sodipodi:sides="5"
|
307
|
+
sodipodi:cx="666.19574"
|
308
|
+
sodipodi:cy="589.50385"
|
309
|
+
sodipodi:r1="7.2431178"
|
310
|
+
sodipodi:r2="4.3458705"
|
311
|
+
sodipodi:arg1="1.0471976"
|
312
|
+
sodipodi:arg2="1.6755161"
|
313
|
+
inkscape:flatsided="false"
|
314
|
+
inkscape:rounded="0.1"
|
315
|
+
inkscape:randomized="0"
|
316
|
+
d="m 669.8173,595.77657 c -0.39132,0.22593 -3.62645,-1.90343 -4.07583,-1.95066 -0.44938,-0.0472 -4.05653,1.36297 -4.39232,1.06062 -0.3358,-0.30235 0.68963,-4.03715 0.59569,-4.47913 -0.0939,-0.44198 -2.5498,-3.43681 -2.36602,-3.8496 0.18379,-0.41279 4.05267,-0.59166 4.44398,-0.81759 0.39132,-0.22593 2.48067,-3.48704 2.93005,-3.4398 0.44938,0.0472 1.81505,3.67147 2.15084,3.97382 0.3358,0.30236 4.08294,1.2817 4.17689,1.72369 0.0939,0.44198 -2.9309,2.86076 -3.11469,3.27355 -0.18379,0.41279 0.0427,4.27917 -0.34859,4.5051 z"
|
317
|
+
transform="matrix(1.511423,-0.16366377,0.16366377,1.511423,-755.37346,-191.93651)" />
|
318
|
+
</g>
|
319
|
+
</g>
|
320
|
+
</g>
|
321
|
+
</g>
|
322
|
+
</svg>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
name: dokuwiki
|
2
|
+
summary: |
|
3
|
+
Dokuwiki is a simple to use wiki.
|
4
|
+
description: |
|
5
|
+
DokuWiki is a simple to use and highly versatile Open Source wiki software
|
6
|
+
that doesn't require a database. It is loved by users for its clean and
|
7
|
+
readable syntax.
|
8
|
+
maintainers: ['Adam Stokes <adam.stokes@ubuntu.com>']
|
9
|
+
series:
|
10
|
+
- xenial
|
11
|
+
tags:
|
12
|
+
- php
|
13
|
+
- wiki
|
14
|
+
resources:
|
15
|
+
stable-release:
|
16
|
+
type: file
|
17
|
+
filename: stable.tgz
|
18
|
+
description: "Dokuwiki stable wiki source"
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<?php
|
2
|
+
/* Generated by Juju
|
3
|
+
*/
|
4
|
+
$conf['title'] = 'Dokuwiki';
|
5
|
+
$conf['tagline'] = 'deployed by Juju';
|
6
|
+
$conf['license'] = 'cc-by-sa';
|
7
|
+
$conf['useacl'] = 1;
|
8
|
+
$conf['superuser'] = '@admin';
|
9
|
+
$conf['disableactions'] = 'register';
|
10
|
+
$conf['showuseras'] = 'username';
|
11
|
+
$conf['youarehere'] = 1;
|
12
|
+
$conf['gzip_output'] = 1;
|
13
|
+
$conf['sitemap'] = 1;
|
14
|
+
$conf['userewrite'] = '1';
|
15
|
+
$conf['useslash'] = 1;
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# users.auth.php
|
2
|
+
# <?php exit()?>
|
3
|
+
# Don't modify the lines above
|
4
|
+
#
|
5
|
+
# Userfile
|
6
|
+
#
|
7
|
+
# Format:
|
8
|
+
#
|
9
|
+
# login:passwordhash:Real Name:email:groups,comma,seperated
|
10
|
+
|
11
|
+
<%= admin_user %>:<%= admin_password %>:<%= admin_name %>:<%= admin_email %>:admin,user
|
@@ -0,0 +1,42 @@
|
|
1
|
+
# set cgi.fix_pathinfo = 0 in /etc/php/7.0/fpm/php.ini
|
2
|
+
|
3
|
+
server {
|
4
|
+
## Your website name goes here.
|
5
|
+
server_name <%= public_address %>;
|
6
|
+
## Your only path reference.
|
7
|
+
root <%= app_path %>;
|
8
|
+
location / {
|
9
|
+
index doku.php;
|
10
|
+
# This is cool because no php is touched for static content.
|
11
|
+
# include the "?$args" part so non-default permalinks doesn't break when using query string
|
12
|
+
try_files $uri $uri/ @dokuwiki;
|
13
|
+
}
|
14
|
+
|
15
|
+
location ~ ^/lib.*\.(gif|png|ico|jpg)$ {
|
16
|
+
expires 30d;
|
17
|
+
}
|
18
|
+
|
19
|
+
location ^~ /conf/ { return 403; }
|
20
|
+
location ^~ /data/ { return 403; }
|
21
|
+
|
22
|
+
location @dokuwiki {
|
23
|
+
rewrite ^/_media/(.*) /lib/exe/fetch.php?media=$1 last;
|
24
|
+
rewrite ^/_detail/(.*) /lib/exe/detail.php?media=$1 last;
|
25
|
+
rewrite ^/_export/([^/]+)/(.*) /doku.php?do=export_$1&id=$2 last;
|
26
|
+
rewrite ^/(.*) /doku.php?id=$1 last;
|
27
|
+
}
|
28
|
+
|
29
|
+
location ~ \.php$ {
|
30
|
+
include fastcgi_params;
|
31
|
+
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
32
|
+
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
|
33
|
+
}
|
34
|
+
# Block access to data folders
|
35
|
+
location ~ /(data|conf|bin|inc)/ {
|
36
|
+
deny all;
|
37
|
+
}
|
38
|
+
# Block access to .htaccess files
|
39
|
+
location ~ /\.ht {
|
40
|
+
deny all;
|
41
|
+
}
|
42
|
+
}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'open3'
|
2
|
+
|
3
|
+
module Charmkit
|
4
|
+
module Helpers
|
5
|
+
def run(*cmd)
|
6
|
+
stdout_s, stderr_s, status = Open3.capture3(*cmd)
|
7
|
+
if not status.success?
|
8
|
+
raise StandardError, "Failed to run command: #{stderr_s}"
|
9
|
+
end
|
10
|
+
return {
|
11
|
+
:out => stdout_s,
|
12
|
+
:err => stderr_s,
|
13
|
+
:status => status
|
14
|
+
}
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
data/lib/charmkit/version.rb
CHANGED
data/lib/charmkit.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: charmkit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Stokes
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-12-
|
11
|
+
date: 2016-12-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -98,15 +98,27 @@ files:
|
|
98
98
|
- bin/console
|
99
99
|
- bin/setup
|
100
100
|
- charmkit.gemspec
|
101
|
-
- examples/
|
102
|
-
- examples/
|
103
|
-
- examples/demo/
|
104
|
-
- examples/demo/
|
105
|
-
- examples/
|
106
|
-
- examples/
|
107
|
-
- examples/
|
101
|
+
- examples/my-demo-charm/Gemfile
|
102
|
+
- examples/my-demo-charm/Gemfile.lock
|
103
|
+
- examples/my-demo-charm/README.md
|
104
|
+
- examples/my-demo-charm/Rakefile
|
105
|
+
- examples/my-demo-charm/config.yaml
|
106
|
+
- examples/my-demo-charm/copyright
|
107
|
+
- examples/my-demo-charm/hooks/config-changed
|
108
|
+
- examples/my-demo-charm/hooks/install
|
109
|
+
- examples/my-demo-charm/hooks/upgrade-charm
|
110
|
+
- examples/my-demo-charm/icon.svg
|
111
|
+
- examples/my-demo-charm/metadata.yaml
|
112
|
+
- examples/my-demo-charm/readme
|
113
|
+
- examples/my-demo-charm/tasks/vim.rb
|
114
|
+
- examples/my-demo-charm/templates/acl.auth.php
|
115
|
+
- examples/my-demo-charm/templates/local.php
|
116
|
+
- examples/my-demo-charm/templates/plugins.local.php
|
117
|
+
- examples/my-demo-charm/templates/users.auth.php
|
118
|
+
- examples/my-demo-charm/templates/vhost.conf
|
108
119
|
- lib/charmkit.rb
|
109
120
|
- lib/charmkit/extend/string_tools.rb
|
121
|
+
- lib/charmkit/helpers/runner.rb
|
110
122
|
- lib/charmkit/helpers/template.rb
|
111
123
|
- lib/charmkit/plugins/nginx.rb
|
112
124
|
- lib/charmkit/plugins/php.rb
|
data/examples/Charmkitfile
DELETED
@@ -1,66 +0,0 @@
|
|
1
|
-
# -*- mode:ruby -*-
|
2
|
-
|
3
|
-
depends_on "nginx-full"
|
4
|
-
depends_on "php-fpm"
|
5
|
-
depends_on "php-cgi"
|
6
|
-
depends_on "php-curl"
|
7
|
-
depends_on "php-gd"
|
8
|
-
depends_on "php-json"
|
9
|
-
depends_on "php-mcrypt"
|
10
|
-
depends_on "php-readline"
|
11
|
-
depends_on "php-mbstring"
|
12
|
-
depends_on "php-xml"
|
13
|
-
|
14
|
-
hook "install" do
|
15
|
-
release = "#{config['release']}-release"
|
16
|
-
app_path = config 'app_path'
|
17
|
-
hook_path = ENV['JUJU_CHARM_DIR']
|
18
|
-
run "tar xf #{resource[release]} -C #{app_path} --strip-components=1"
|
19
|
-
rm "#{app_path}/conf/install.php" if is_file? "#{app_path}/conf/install.php"
|
20
|
-
cp "#{hook_path}/templates/acl.auth.php", "#{app_path}/conf/acl.auth.php"
|
21
|
-
cp "#{hook_path}/templates/local.php", "#{app_path}/conf/local.php"
|
22
|
-
cp "#{hook_path}/templates/plugins.local.php", "#{app_path}/conf/plugin.local.php"
|
23
|
-
file "/etc/dokuwiki-release", content: release
|
24
|
-
case release
|
25
|
-
when "stable"
|
26
|
-
version = cat "#{app_path}/VERSION"
|
27
|
-
run "application-version-set '#{version}'"
|
28
|
-
when "development"
|
29
|
-
t = Time.now
|
30
|
-
version = t.strftime "%Y-%m-%d"
|
31
|
-
run "application-version-set 'development-#{version}'"
|
32
|
-
else
|
33
|
-
status :blocked, "Unable to set proper application version"
|
34
|
-
exit 1
|
35
|
-
end
|
36
|
-
end
|
37
|
-
|
38
|
-
hook "config-changed" do
|
39
|
-
app_path = config 'app_path'
|
40
|
-
hook_path = ENV['JUJU_CHARM_DIR']
|
41
|
-
installed_release = cat "/etc/dokuwiki-release"
|
42
|
-
release = config 'release'
|
43
|
-
if !installed_release.eql? release
|
44
|
-
run './hooks/install'
|
45
|
-
end
|
46
|
-
|
47
|
-
admin_user = config 'admin_user'
|
48
|
-
admin_password = config 'admin_password'
|
49
|
-
admin_name = config 'admin_name'
|
50
|
-
admin_email = config 'admin_email'
|
51
|
-
template "#{hook_path}/templates/users.auth.php",
|
52
|
-
"#{app_path}/conf/users.auth.php",
|
53
|
-
admin_user: admin_user,
|
54
|
-
admin_password: admin_password,
|
55
|
-
admin_name: admin_name,
|
56
|
-
admin_email: admin_email
|
57
|
-
|
58
|
-
template "#{hook_path}/templates/vhost.conf",
|
59
|
-
"/etc/nginx/sites-enabled/default",
|
60
|
-
public_address: unit['public-address'],
|
61
|
-
app_path: app_path
|
62
|
-
|
63
|
-
chown_R 'www-data', 'www-data', app_path
|
64
|
-
run "systemctl restart nginx"
|
65
|
-
status :active, "Ready"
|
66
|
-
end
|
data/examples/basic.rb
DELETED
@@ -1,30 +0,0 @@
|
|
1
|
-
require 'charmkit'
|
2
|
-
|
3
|
-
class Install < Charmkit
|
4
|
-
plugin :core
|
5
|
-
plugin :nginx
|
6
|
-
plugin :php
|
7
|
-
|
8
|
-
incant :nginx_install do |nginx|
|
9
|
-
ngnix.install
|
10
|
-
nginx.set_vhost server_name: config('server_name'),
|
11
|
-
application_path: config('app_path')
|
12
|
-
end
|
13
|
-
incant :php_install do |php|
|
14
|
-
php.install version: 7,
|
15
|
-
plugins: ['fpm',
|
16
|
-
'cgi',
|
17
|
-
'curl',
|
18
|
-
'gd',
|
19
|
-
'json',
|
20
|
-
'mcrypt',
|
21
|
-
'readline',
|
22
|
-
'mbstring',
|
23
|
-
'xml']
|
24
|
-
end
|
25
|
-
|
26
|
-
|
27
|
-
def summon
|
28
|
-
log "Running example charm code"
|
29
|
-
end
|
30
|
-
end
|
data/examples/plugin_loader.rb
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
require 'charmkit/helpers'
|
data/examples/template.rb
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
Hi there <%= firstname %> <%= lastname %>
|
File without changes
|