Skip to content
Snippets Groups Projects
Commit 48624c90 authored by Claudio Pisa's avatar Claudio Pisa
Browse files

initial commit

parents
No related branches found
No related tags found
No related merge requests found
# Overview
Describe the intended usage of this charm and anything unique about how this charm relates to others here.
This README will be displayed in the Charm Store, it should be either Markdown or RST. Ideal READMEs include instructions on how to use the charm, expected usage, and charm features that your audience might be interested in. For an example of a well written README check out Hadoop: http://jujucharms.com/charms/precise/hadoop
Use this as a Markdown reference if you need help with the formatting of this README: http://askubuntu.com/editing-help
This charm provides [service](http://example.com). Add a description here of what the service itself actually does.
Also remember to check the [icon guidelines](https://jujucharms.com/docs/stable/authors-charm-icon) so that your charm looks good in the Juju GUI.
# Usage
Step by step instructions on using the charm:
juju deploy servicename
and so on. If you're providing a web service or something that the end user needs to go to, tell them here, especially if you're deploying a service that might listen to a non-default port.
You can then browse to http://ip-address to configure the service.
If the charm has any recommendations for running at scale, outline them in examples here. For example if you have a memcached relation that improves performance, mention it here.
This not only helps users but gives people a place to start if they want to help you add features to your charm.
# Configuration
The configuration options will be listed on the charm store, however If you're making assumptions or opinionated decisions in the charm (like setting a default administrator password), you should detail that here so the user knows how to change it immediately, etc.
# Contact Information
Though this will be listed in the charm store itself don't assume a user will know that, so include that information here:
- Upstream website
- Upstream bug tracker
- Upstream mailing list or contact information
- Feel free to add things if it's useful for users
options:
endpoint:
type: string
default: "/blog"
description: "A short description of the configuration option"
#!/bin/bash
database=`relation-get database`
[ -z "$database" ] && exit 0
# retrieve the remaining values
# which have been set by the mysql charm
user=`relation-get user`
password=`relation-get password`
host=`relation-get private-address`
# write configuration file
echo "<?php
define('DB_NAME', '${database}');
define('DB_USER', '${user}');
define('DB_PASSWORD', '${password}');
define('DB_HOST', '${host}');
define('WP_CONTENT_DIR', '/usr/share/wordpress/wp-content');
?>" >/etc/wordpress/config-default.php
open-port 80
status-set active "Ready"
#!/bin/bash
status-set maintenance "Installing wordpress"
apt-get install -y wordpress
status-set maintenance "Configuring wordpress"
echo "
Alias /blog /usr/share/wordpress
<Directory /usr/share/wordpress>
Options FollowSymLinks
AllowOverride Limit Options FileInfo
DirectoryIndex index.php
Order allow,deny
Allow from all
</Directory>
<Directory /usr/share/wordpress/wp-content>
Options FollowSymLinks
Order allow,deny
Allow from all
</Directory>" > /etc/apache2/sites-available/wordpress.conf
a2ensite wordpress
status-set maintenance "Wordpress installed"
#!/bin/bash
status-set maintenance "Starting wordpress"
service apache2 restart
status-set blocked "Waiting for database relation"
#!/bin/bash
relation-set "hostname=$(unit-get private-address)"
relation-set "port=80"
icon.svg 0 → 100644
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="100px"
height="100px"
viewBox="0 0 100 100"
version="1.1"
id="svg18"
sodipodi:docname="icon.svg"
inkscape:version="0.92.2 (5c3e80d, 2017-08-06)">
<metadata
id="metadata22">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title>eclispe-che</dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1035"
inkscape:window-height="757"
id="namedview20"
showgrid="false"
inkscape:pagecheckerboard="true"
inkscape:zoom="4.72"
inkscape:cx="45.148181"
inkscape:cy="48.99602"
inkscape:window-x="3578"
inkscape:window-y="123"
inkscape:window-maximized="0"
inkscape:current-layer="layer1" />
<!-- Generator: Sketch 45.2 (43514) - http://www.bohemiancoding.com/sketch -->
<title
id="title2">eclispe-che</title>
<desc
id="desc4">Created with Sketch.</desc>
<defs
id="defs7">
<path
d="M50.0004412,4.04252804e-14 C22.3871247,4.04252804e-14 0,22.3848726 0,49.9995588 C0,77.6133626 22.3871247,100 50.0004412,100 C77.6137577,100 100,77.6133626 100,49.9995588 C100,22.3848726 77.6128753,3.55271368e-14 50.0004412,4.04252804e-14 Z"
id="path-1" />
</defs>
<g
inkscape:groupmode="layer"
id="layer1"
inkscape:label="BACKGROUND">
<g
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-opacity:1"
id="Page-1">
<g
id="eclispe-che"
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-opacity:1">
<g
id="path3023-path"
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-opacity:1">
<use
xlink:href="#path-1"
id="use9"
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-opacity:1"
x="0"
y="0"
width="100%"
height="100%" />
<path
d="M 50.000441,0.5 C 22.662621,0.5 0.5,22.661661 0.5,49.999559 0.5,77.337051 22.663098,99.5 50.000441,99.5 77.337613,99.5 99.5,77.337222 99.5,49.999559 99.5,22.661796 77.337514,0.5 50.000441,0.5 Z"
id="path11"
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1;stroke-opacity:1"
inkscape:connector-curvature="0" />
</g>
</g>
</g>
</g>
<g
inkscape:groupmode="layer"
id="layer2"
inkscape:label="PLACE LOGO HERE" />
</svg>
name: wordpress
summary: The wordpress CMS
maintainer: GARR CSD <cloud-support@garr.it>
description: The Wordpress Content Management System
tags: [cms]
subordinate: false
series: [bionic]
provides:
website:
interface: http
requires:
database:
interface: mysql
1
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment