owncloud #2
Description
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.
- Tags:
- file-servers ›
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
Configuration
- customssl
- (boolean) option to set if custom ssl certificates are going to be used
- domain
- (string) the domain name for your owncloud server
- downloadurl
- (string) url from which owncloud will be downloaded
- http://download.owncloud.org/community/owncloud-7.0.2.tar.bz2
- password
- (string) default administrative password
- port
- (int) apache listening port
- 80
- sha1sum
- (string) the sha1sum for the file in the download link
- d0b0012972db6a1415251d3d6c49432b4f7cc3ec
- src
- (string) source from where the charm will install the package
- repo
- sslcert
- (string) ssl cert to be used if custom is on
- sslkey
- (string) ssl key to be used if custom is on
- user
- (string) default administrative user
- owncloud