~jose/charms/precise/owncloud/port-change+repo+ssl-support

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
# OwnCloud

- Author: Atul Jha <koolhead17@gmail.com>
- Maintainer: José Antonio Rey <jose@ubuntu.com>

# Overview

ownCloud provides universal access to your files via the web, your computer or
your mobile devices — wherever you are. It also provides a platform to easily
view & sync your contacts, calendars and bookmarks across all your devices and
enables basic editing right on the web.

This charm installs Apache2, Apache-Mod-PHP5, and configures OwnCloud with
sqlite as a standalone server. Provides relationship hooks with NFS file
storage, MySQL Databases, and HAProxy reverse proxy charms.

# Configuration

This charm comes with different configuration options. Optional configuration
options include:

`domain`: This is the domain or IP address for your ownCloud instance. If you
do not know what it is, execute `juju status` to find out the public address. If
not provided, the charm will refuse to configure.

`downloadurl`: This is the download URL that the charm will use in case the src
option is set to `source`. It defaults to the 6.0.4 URL.

`sha1sum`: This is the SHA1SUM for the `downloadurl` file. It defaults to the
SHA1SUM for the 6.0.4 file.

`port`: This is the alias port that will be used for the ownCloud instance. It
will redirect to 443, which is the HTTPS port. It defaults to 80.

`src`: This is the source from which the package will be installed. You can
choose between `repo`, which will install it from a repository built by
ownCloud, or `source`, which will download the tarball and extract it. It
defaults to `repo`.

`customssl`: This charm provides default SSL support for ownCloud. This means
that if you do not provide a custom SSL key and certificate, a self-signed one
will be auto-generated for you. If you want to use a custom SSL certificate,
please set this option to `true`. It defaults to `false`.

`sslkey`: If `customssl` is set to true, this is the SSL key that will be used.
If not provided and `customssl` is true, the charm will refuse to configure.

`sslcert`: If `customssl` is set to true, this is the SSL cert that will be
used. If not provided and `customssl` is true, the charm will refuse to
configure.

`user`: This user will be used in case you want to do a setup of Shared
Instances. If not provided, it will be defaulted to `ownCloud`.

`password`: This password will be used in case you want to do a setup of
Shared Instances. If not provided, it will be randomly generated when a DB
relation is joined.

You can put any of this options in a config.yaml file and specify it at the
moment of deploying. Otherwise, you can change them by executing:

    juju set owncloud [option]=[value]

# Usage

## Standalone Instance

First, bootstrap your environment:

    juju bootstrap

Then, deploy ownCloud by executing the following command:
    
    juju deploy owncloud

Finally, expose the service:

    juju expose owncloud

Access OwnCloud service directly, and complete the setup, providing user
credentials and initializing sqlite database.

## Shared Instances

If you want to deploy shared instances, execute the following commands after
doing a Standalone Instance setup:

    juju deploy mysql
    juju add-relation mysql owncloud

    juju deploy nfs
    juju add-relation nfs owncloud

We're now done! To find out the address for your ownCloud instance, execute
`juju status` and navigate to it.

# Scale out Usage

In order to do a scalabe deploy of ownCloud, execute the following commands

    juju bootstrap
    juju deploy owncloud
    juju deploy mysql
    juju deploy haproxy
    juju add-relation mysql owncloud
    juju add-relation haproxy owncloud
    juju add-unit owncloud

# Internet Connection Requirements

This charm downloads files from the Internet, and requires Internet connectivity
in order to properly install. The requirements vary for each setup type.

## When installing from the source

When installing from the source packages available for download, this charm will
connect to the following Internet sites:

 * download.owncloud.org with port 443
 * The Ubuntu repositories or a private mirror of them

## When installing from the repository

ownCloud offers the option to install from a repository. This is the default
configuration value for the charm. With this, the charm will connect to the
following Internet sites:

 * download.opensuse.org with port 80
 * download.opensuse.org as a repository
 * The Ubuntu repositories or a private mirror of them

# Known Limitations

If you have been using a standalone instance and want to migrate to a shared
instance, please note that adding the mysql relation will not preserve the file
structure in the database. This means that your file listing will not be
available. Make sure to have this in mind when doing the migration.

Also, if you leave the `customssl` option set to false or provide a self-signed
SSL certificate, ownCloud will throw a WebDAV error after creating the admin
username and password. Ignore this error as it does not affect the working of
ownCloud (it is silently fixed), and enter your website again.

If port is different than 80, it looks like the instance throws an SSL
error when connecting. Recommendation is to set the `port` value to 80 to avoid
problems.

Finally, on the tests side, the tests will fail on the local provider due to
NFS not being able to deploy correctly (this is an NFS-related issue).

#TODO
Genericize shared-fs-relation-* for non-nfs shared-fs providers