diaspora

  • By joe
  • Latest version (#0)
  • trusty
  • Stable
  • Edge

Description

diaspora, the privacy aware, personally controlled, do-it-all,
open source social network, is a decentralized social network
that puts you in control of you own data. When you set up a
personal pod, all your data is stored in that pod. You maintain
ownership of everything you share on diaspora
, giving you full
control over how it's distributed.


Overview

diaspora* social network server. See more about diaspora* here -
http://diasporafoundation.org

Note! This version corresponds to diaspora* 0.5.99.x development version (ie the 0.6 dev branch). Not guaranteed to
work with older or newer major versions.

Usage

diaspora* service

To install diaspora*, you will need to know the hostname that will be used.
Think carefully before installing, as this cannot be changed after installation.

To set the hostname, you will need to create a configuration file. At minimum
it needs the host name setting, but you can configure other parts of the
charm at the same time.

Note! While the hostname can be set after the initial deploy command - the
application will not be fully configured until a hostname is provided, so it is
wise to create a configuration file for the initial deploy command.

To deploy (from the Juju Charm store, once this lands there):

juju deploy --config=<path to config> diaspora

Until the charm is found in the charm store, deploy from a local repository. To
do this first create a path charms/trusty somewhere. Change to that path and
clone this repository. Create the config file and then:

juju deploy --config=<path to config> --repository=<path to charms/>
local:trusty/diaspora

Currently Apache and Redis are installed inside the diaspora* container though
this will possible change.

Hostname after deploy

If you didn't or forgot to set hostname during the deploy command, make sure to
set it before adding a db relation! Do:

juju set diaspora hostname="yourhostname.tld"

To deploy as localhost, Do:

juju set diaspora hostname="127.0.0.1"

Database

If you don't already have one, you also need to deploy a database. Here we are
currently restricting ourselves to PostgreSQL.

To deploy just a plain database, you can do as follows:

juju deploy postgresql

Optionally add --to=0 to the command to deploy it to the Juju state machine.

Finish install

Once services are deployed, create a relation with the database:

juju add-relation postgresql:db-admin diaspora:db

This will then trigger the actual building of the application - as it cannot be
fully completed without a database.

Important! Please note diaspora* takes a very long time to install, due to
the many Ruby gems that need to be pulled in. Depending on machine, this could
be from 5 to 30 minutes. Use juju debug-log to see the current progress. When
it is ready you will see Starting diaspora* server in the log as one of the
final lines.

Expose service

After everything is installed, you can expose:

juju expose diaspora

Note down the public address of the diaspora* service and check that it works.

juju status

Configuration

See config.yaml for all options (link to file).

The only required (and not changeable afterwards!) option is hostname. Attempting to change the hostname afterwards will not take effect in the diaspora* installation.

backup_*

A group of settings related to running backups of file uploads. See the Juju Backup charm and config.yaml for details. If the jujubackup charm is not installed, these settings have no effect.

Upgrading diaspora*

To upgrade the diaspora* instance, you can use the following command:

juju action do diaspora/<unit> upgrade

<unit> = unit number of the diaspora service.

Known Limitations and Issues

  • Currently this charm supports only the PostgreSQL and Apache combination.
  • This charm is currently for Ubuntu 14.04 (Trusty) targets only.
  • Running several units at the same time has not been tested by the charm
    author.
  • Removing the relation between PostgreSQL and Diaspora does not drop the
    database due to a timing issue with the hooks firing. If you need to
    reinstall the Diaspora service, please drop the diaspora_production
    database manually from the PostgreSQL admin console - or just destroy
    the whole PostgreSQL service.
    Issue tracked here.

Contact Information

Discuss this charm in our Loomio diaspora*
packaging
group.

Charm Contact

Contact the charm author;

Please file bugs on GitHub. Pull
requests also welcome!

This charm is also on Launchpad, code
will be synced there from GitHub.

License

GNU General Public License v3 (GPL-3).

The author provides this charm as is and under no situation is responsible for
what it does or doesn't do.

Configuration

tumblr_key
(string) Tumblr key for services integration.
post_restore_script_path
(string) Path to the script to run after starting the backup.
/usr/local/sbin/post_restore.sh
facebook_authorized
(string) Facebook authorized users scope (0.5.1.x ->)
false
enable_registrations
(boolean) Enable new users to create accounts.
True
ssl_key
(string) SSL private key for pod domain. See readme how to best use this configuration value. Must be unencrypted.
relay_inbound
(boolean) Subscribe to relay posts.
True
logging_debug
(boolean) Enable or disable certain error and debug logging. Keep this disabled if you don't need this information or want to run the pod with as little memory as possible.
ssl_startssl
(boolean) If you are using Start SSL for your certficates, then set to 'True'. diaspora* requires a valid SSL certificate for federation.
ssl_snakebite
(boolean) If you don't set 'ssl_key' and 'ssl_cert', by default the default snakebite self-signed certifications will be used until a proper cert is set. Set this to false once you transfer the cert manually to the server. Note! diaspora* requires a valid SSL certificate for federation. Running a production real diaspora* pod using snakebite certs is **not** possible.
True
maintenance_remove_old_users
(boolean) Remove old inactive users automatically in the background. This happens after 2 years of inactivity. A warning will be sent to the account and if the user doesn't log in within 30 days, the account will automatically be deleted.
True
terms_agelimit
(int) Set a positive number to activate this setting. This age limit is shown in the default ToS document.
mail_smtp_host
(string) Host for SMTP mail server, if used
facebook_app_id
(string) Facebook app id for services integration.
post_backup_script_path
(string) Path to the script to run after starting the backup.
/usr/local/sbin/post_backup.sh
terms
(boolean) Enable Terms of Service? A default ToS document will be shown to users wanting to create accounts.
backup_destination
(string) Remote folder where to store the backups.
backup
twitter_secret
(string) Twitter secret if key given.
statistics
(boolean) Enable statistics from the pod? This includes user and post counts. Statistics will be exposed at /statistics.json
backup_backend
(string) At the moment "swift", "u1" and "s3" backends are supported.
swift
hostname
(string) Pod hostname in the format `domain.tld`. Subdomains are allowed. Subfolders are not supported by diaspora* at this moment. NOTE! This is *required* and *cannot* be changed after installation. Changing will not take any effect on the diaspora* installation.
backup_swift_username
(string) Swift Username
ssl_chain
(string) SSL chain for cert. See readme how to best use this configuration value.
mail_smtp_domain
(string) Sending 'HELO' command domain for SMTP server, if used. By default pod domain will be used - otherwise set it here.
bitcoin_address
(string) Bitcoin address for donations.
branch
(string) Branch to use. Does not normally need to be changed.
master
tumblr_secret
(string) Tumblr secret if ID given.
backup_aws_secret_access_key
(string) AWS Password
backup_aws_access_key_id
(string) AWS Username
admin_account
(string) Once created, set admin account username here.
mail_smtp_password
(string) Password for SMTP mail server, if used
relay_outbound
(boolean) Push out public posts to a relay.
True
twitter_key
(string) Twitter key for services integration.
repository
(string) Repository to use. Does not normally need to be changed.
diaspora/diaspora
pre_backup_script_path
(string) Path to the script to run before starting the backup.
/usr/local/sbin/pre_backup.sh
mail_smtp_authentication
(string) Authentication type for SMTP, if used. Either 'plain', 'login', 'cram_md5' or 'none'.
plain
backup_strategy
(string) Duplicity supports either "full" or "incremental" backup strategy.
full
verbose_curl_debug
(boolean) Enable verbose curl debug logging.
backup_passphrase
(string) PGP passphrase duplicity will use to encrypt the backup.
passphrase
backup_schedule
(string) Frequency of backup.
daily
ssl_cert
(string) SSL cert for pod domain. See readme how to best use this configuration value.
mail_smtp_username
(string) Username for SMTP mail server, if used
pre_restore_script_path
(string) Path to the script to run before starting the backup.
/usr/local/sbin/pre_restore.sh
facebook_app_secret
(string) Facebook app secret if ID given.
backup_sources
(string) List of folder to backup, in json format.
["/tmp/files"]
mail_smtp_port
(int) Port for SMTP mail server, if used
587
sidekiq_concurrency
(int) Number of parallel threads Sidekiq uses. Increase this gradually if Sidekiq cannot process jobs fast enough. 2 is good for a minimal pod. The higher this setting, the more memory Sidekiq will need. Warning, do not increase this over 25 without increasing 'pool' in config/database.yml!
2
mail_type
(string) How emails are sent, options: sendmail or smtp. If smtp, don't forget to set mail_smtp_host.
sendmail
terms_jurisdiction
(string) If you enable a ToS, you should define what jurisdiction is used to handle legal disputes. For example, state/country or country, depending on your location.
backup_ftp_password
(string) OAuth token in the FTP_PASSWORD form used by duplicity.
backup_swift_url
(string) Swift URL
podname
(string) A name for the pod.
diaspora*
admin_email
(string) Set pod administrator email here. This will also be visible in the terms and privacy policy pages, if enabled.
backup_swift_password
(string) Swift Password