From 42467ec6d436ca02708eed579febda6f81319f95 Mon Sep 17 00:00:00 2001
From: Trent Palmer
Date: Thu, 13 Jul 2017 05:29:08 -0700
Subject: [PATCH] add new file docs/mastodon_on_arch.md
---
docs/index.md | 1 +
docs/mastodon_on_arch.md | 59 +++++
mkdocs.yml | 1 +
site/arch_postgresql_nspawn/index.html | 5 +
site/arch_redis_nspawn/index.html | 5 +
.../index.html | 9 +-
.../index.html | 5 +
site/index.html | 8 +-
site/mastodon_on_arch/index.html | 237 ++++++++++++++++++
site/mkdocs/search_index.json | 29 ++-
site/nspawn/index.html | 9 +-
site/search.html | 5 +
site/self_signed_certs/index.html | 5 +
.../index.html | 5 +
site/sitemap.xml | 24 +-
15 files changed, 392 insertions(+), 15 deletions(-)
create mode 100644 docs/mastodon_on_arch.md
create mode 100644 site/mastodon_on_arch/index.html
diff --git a/docs/index.md b/docs/index.md
index d0e901b..ea7b7b9 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -4,6 +4,7 @@ Obviously, the commit history will reflect the time when these documents are wri
* [Serve And Share Apps From Your Phone With Fdroid](serve_and_share_apps_from_your_phone_with_fdroid.md)
* [Nspawn Containers](nspawn.md)
+* [Mastodon on Arch](mastodon_on_arch.md)
* [Debian Nspawn Container On Arch For Testing Apache Configurations](debian_nspawn_container_on_arch_for_testing_apache_configurations.md)
* [Dynamic Cacheing Nginx Reverse Proxy For Pacman](dynamic_cacheing_nginx_reverse_proxy_for_pacman.md)
* [Quick Dirty Redis Nspawn Container on Arch Linux](arch_redis_nspawn.md)
diff --git a/docs/mastodon_on_arch.md b/docs/mastodon_on_arch.md
new file mode 100644
index 0000000..85abf46
--- /dev/null
+++ b/docs/mastodon_on_arch.md
@@ -0,0 +1,59 @@
+# Some Observations About Installing Mastodon on Arch.
+
+## Nginx
+
+From the [Production Guide](https://github.com/tootsuite/documentation/blob/master/Running-Mastodon/Production-guide.md)
+you can copy the example nginx.conf file to `/etc/nginx/sites-enabled/some_arbitrary.conf`,
+and then add the following to `/etc/nginx/nginx.conf` in the http section,
+this with a fresh install of nginx with the default configuration file.
+
+```bash
+# /etc/nginx/nginx.conf
+http {
+ include sites-enabled/*;
+}
+```
+
+## Installing the Dependancies
+
+```bash
+pacman -S certbot nginx libxml2 imagemagick ffmpeg git yarn npm python2 oidentd
+```
+
+```bash
+# I'm guessing here
+pacman -S libpqxx libxslt protobuf protobuf-c
+```
+
+* I'm assuming base-devel is installed
+* python2 seems to be required to run `yarn install` command later on
+* oidentd seems to be a usable replacement for pident
+* libpqxx pulls in postgresql-libs
+* file is already installed
+* curl is already installed
+* ruby-build and rbenv are installable from aur
+* also postgresql and redis unless, those are in another container or whatever.
+
+## Other Observations
+
+I discovered that between `gem install bundler` and
+`bundle install --deployment --without development test`,
+you have to update your environment, with
+`eval "$(rbenv init -)"`, i.e.
+
+```bash
+echo 'eval "$(rbenv init -)"' >> .bashrc
+# and then
+. ~/.bashrc
+```
+
+You have to update your environment more than once, during the
+installation.
+
+Presumably you don't ever want to delete the `~/live/Public/` directory
+if that is where assets are being stored, but it seems ok to delete
+`~/live/node_modules` and then rerun the `yarn install` command.
+
+In `~/live/.env.production`, `SINGLE_USER_MODE=false` has to be set
+to `false` until at least one user is created, or the web service won't
+even start. (Also `chmod 755 ~/`)
diff --git a/mkdocs.yml b/mkdocs.yml
index b10085b..bcf3117 100644
--- a/mkdocs.yml
+++ b/mkdocs.yml
@@ -6,6 +6,7 @@ pages:
- 'Home': index.md
- 'Serve And Share Apps From Your Phone With Fdroid': serve_and_share_apps_from_your_phone_with_fdroid.md
- 'Nspawn': nspawn.md
+ - 'Mastodon on Arch': mastodon_on_arch.md
- 'Debian Nspawn Container On Arch For Testing Apache Configurations': debian_nspawn_container_on_arch_for_testing_apache_configurations.md
- 'Dynamic Cacheing Nginx Reverse Proxy For Pacman': dynamic_cacheing_nginx_reverse_proxy_for_pacman.md
- 'Quick Dirty Redis Nspawn Container on Arch Linux': arch_redis_nspawn.md
diff --git a/site/arch_postgresql_nspawn/index.html b/site/arch_postgresql_nspawn/index.html
index a56755d..0ef32f7 100644
--- a/site/arch_postgresql_nspawn/index.html
+++ b/site/arch_postgresql_nspawn/index.html
@@ -64,6 +64,11 @@
Some Observations About Installing Mastodon on Arch.
+
Nginx
+
From the Production Guide
+you can copy the example nginx.conf file to /etc/nginx/sites-enabled/some_arbitrary.conf,
+and then add the following to /etc/nginx/nginx.conf in the http section,
+this with a fresh install of nginx with the default configuration file.
+
# /etc/nginx/nginx.conf
+http {
+ include sites-enabled/*;
+}
+
python2 seems to be required to run yarn install command later on
+
oidentd seems to be a usable replacement for pident
+
libpqxx pulls in postgresql-libs
+
file is already installed
+
curl is already installed
+
ruby-build and rbenv are installable from aur
+
also postgresql and redis unless, those are in another container or whatever.
+
+
Other Observations
+
I discovered that between gem install bundler and
+bundle install --deployment --without development test,
+you have to update your environment, with
+eval "$(rbenv init -)", i.e.
+
echo 'eval "$(rbenv init -)"' >> .bashrc
+# and then
+. ~/.bashrc
+
+
+
You have to update your environment more than once, during the
+installation.
+
Presumably you don't ever want to delete the ~/live/Public/ directory
+if that is where assets are being stored, but it seems ok to delete
+~/live/node_modules and then rerun the yarn install command.
+
In ~/live/.env.production, SINGLE_USER_MODE=false has to be set
+to false until at least one user is created, or the web service won't
+even start. (Also chmod 755 ~/)
+
+
+
+
diff --git a/site/mkdocs/search_index.json b/site/mkdocs/search_index.json
index 691b922..3868148 100644
--- a/site/mkdocs/search_index.json
+++ b/site/mkdocs/search_index.json
@@ -2,7 +2,7 @@
"docs": [
{
"location": "/",
- "text": "Welcome to Trent Docs\n\n\nGit Repo For These Docs\n\n\nObviously, the commit history will reflect the time when these documents are written.\n\n\n\n\nServe And Share Apps From Your Phone With Fdroid\n\n\nNspawn Containers\n\n\nDebian Nspawn Container On Arch For Testing Apache Configurations\n\n\nDynamic Cacheing Nginx Reverse Proxy For Pacman\n\n\nQuick Dirty Redis Nspawn Container on Arch Linux\n\n\nQuick Dirty Postgresql Nspawn Container on Arch Linux\n\n\nSelf Signed Certs",
+ "text": "Welcome to Trent Docs\n\n\nGit Repo For These Docs\n\n\nObviously, the commit history will reflect the time when these documents are written.\n\n\n\n\nServe And Share Apps From Your Phone With Fdroid\n\n\nNspawn Containers\n\n\nMastodon on Arch\n\n\nDebian Nspawn Container On Arch For Testing Apache Configurations\n\n\nDynamic Cacheing Nginx Reverse Proxy For Pacman\n\n\nQuick Dirty Redis Nspawn Container on Arch Linux\n\n\nQuick Dirty Postgresql Nspawn Container on Arch Linux\n\n\nSelf Signed Certs",
"title": "Home"
},
{
@@ -12,7 +12,7 @@
},
{
"location": "/#git-repo-for-these-docs",
- "text": "Obviously, the commit history will reflect the time when these documents are written. Serve And Share Apps From Your Phone With Fdroid Nspawn Containers Debian Nspawn Container On Arch For Testing Apache Configurations Dynamic Cacheing Nginx Reverse Proxy For Pacman Quick Dirty Redis Nspawn Container on Arch Linux Quick Dirty Postgresql Nspawn Container on Arch Linux Self Signed Certs",
+ "text": "Obviously, the commit history will reflect the time when these documents are written. Serve And Share Apps From Your Phone With Fdroid Nspawn Containers Mastodon on Arch Debian Nspawn Container On Arch For Testing Apache Configurations Dynamic Cacheing Nginx Reverse Proxy For Pacman Quick Dirty Redis Nspawn Container on Arch Linux Quick Dirty Postgresql Nspawn Container on Arch Linux Self Signed Certs",
"title": "Git Repo For These Docs"
},
{
@@ -180,6 +180,31 @@
"text": "You can start/stop nspawn containers with machinectl command. You can start nspawn containers with systemd-nspawn command. You can configure the systemd service for a container with @nspawn.service file override Or you can configure an nspawn container with a dot.nspawn file But in regards to the above list\nI have noticed differences in behaviour,\nin some scenarios, concerning file attributes\nfor bind mounts. Another curiosity: when you have nspawn containers natted on VirtualEthernet connections,\nthey might be able to ping each other at 10.x.y.z, but not resolve each other. But they might\nbe able to resolve each other if they are all connected to the same bridge interface or nspawn\nnetwork zone, but will randomly resolve each other in any of the 10.x.y.z, 169.x.y.z,\nor fe80::....:....:....%host (ipv6 local) spaces, which would complicate configuring the containers\nto talk to each other. But I intend to look into this some more.",
"title": "Final Observations"
},
+ {
+ "location": "/mastodon_on_arch/",
+ "text": "Some Observations About Installing Mastodon on Arch.\n\n\nNginx\n\n\nFrom the \nProduction Guide\n\nyou can copy the example nginx.conf file to \n/etc/nginx/sites-enabled/some_arbitrary.conf\n,\nand then add the following to \n/etc/nginx/nginx.conf\n in the http section,\nthis with a fresh install of nginx with the default configuration file.\n\n\n# /etc/nginx/nginx.conf \nhttp {\n include sites-enabled/*;\n}\n\n\n\n\nInstalling the Dependancies\n\n\npacman -S certbot nginx libxml2 imagemagick ffmpeg git yarn npm python2 oidentd\n\n\n\n\n# I'm guessing here\npacman -S libpqxx libxslt protobuf protobuf-c\n\n\n\n\n\n\nI'm assuming base-devel is installed\n\n\npython2 seems to be required to run \nyarn install\n command later on\n\n\noidentd seems to be a usable replacement for pident\n\n\nlibpqxx pulls in postgresql-libs\n\n\nfile is already installed\n\n\ncurl is already installed\n\n\nruby-build and rbenv are installable from aur\n\n\nalso postgresql and redis unless, those are in another container or whatever.\n\n\n\n\nOther Observations\n\n\nI discovered that between \ngem install bundler\n and\n\n\nbundle install --deployment --without development test\n,\nyou have to update your environment, with \n\neval \"$(rbenv init -)\"\n, i.e.\n\n\necho 'eval \"$(rbenv init -)\"' >> .bashrc\n# and then\n. ~/.bashrc\n\n\n\n\nYou have to update your environment more than once, during the\ninstallation.\n\n\nPresumably you don't ever want to delete the \n~/live/Public/\n directory\nif that is where assets are being stored, but it seems ok to delete \n\n~/live/node_modules\n and then rerun the \nyarn install\n command.\n\n\nIn \n~/live/.env.production\n, \nSINGLE_USER_MODE=false\n has to be set\nto \nfalse\n until at least one user is created, or the web service won't \neven start. (Also \nchmod 755 ~/\n)",
+ "title": "Mastodon on Arch"
+ },
+ {
+ "location": "/mastodon_on_arch/#some-observations-about-installing-mastodon-on-arch",
+ "text": "",
+ "title": "Some Observations About Installing Mastodon on Arch."
+ },
+ {
+ "location": "/mastodon_on_arch/#nginx",
+ "text": "From the Production Guide \nyou can copy the example nginx.conf file to /etc/nginx/sites-enabled/some_arbitrary.conf ,\nand then add the following to /etc/nginx/nginx.conf in the http section,\nthis with a fresh install of nginx with the default configuration file. # /etc/nginx/nginx.conf \nhttp {\n include sites-enabled/*;\n}",
+ "title": "Nginx"
+ },
+ {
+ "location": "/mastodon_on_arch/#installing-the-dependancies",
+ "text": "pacman -S certbot nginx libxml2 imagemagick ffmpeg git yarn npm python2 oidentd # I'm guessing here\npacman -S libpqxx libxslt protobuf protobuf-c I'm assuming base-devel is installed python2 seems to be required to run yarn install command later on oidentd seems to be a usable replacement for pident libpqxx pulls in postgresql-libs file is already installed curl is already installed ruby-build and rbenv are installable from aur also postgresql and redis unless, those are in another container or whatever.",
+ "title": "Installing the Dependancies"
+ },
+ {
+ "location": "/mastodon_on_arch/#other-observations",
+ "text": "I discovered that between gem install bundler and bundle install --deployment --without development test ,\nyou have to update your environment, with eval \"$(rbenv init -)\" , i.e. echo 'eval \"$(rbenv init -)\"' >> .bashrc\n# and then\n. ~/.bashrc You have to update your environment more than once, during the\ninstallation. Presumably you don't ever want to delete the ~/live/Public/ directory\nif that is where assets are being stored, but it seems ok to delete ~/live/node_modules and then rerun the yarn install command. In ~/live/.env.production , SINGLE_USER_MODE=false has to be set\nto false until at least one user is created, or the web service won't \neven start. (Also chmod 755 ~/ )",
+ "title": "Other Observations"
+ },
{
"location": "/debian_nspawn_container_on_arch_for_testing_apache_configurations/",
"text": "Debian Nspawn Container On Arch For Testing Apache Configurations\n\n\nBegin by exporting the environmental variable for your squid cacheing \nproxy. If you're deboostrapping Debian file systems, the best way to\nspeed this up is with squid.\n\n\nThe ArchWiki page for nspawn containers has a\n\nDebian/Ubuntu subsection\n\nObviously you're going to want to install debootstrap and debian-archive-keyring.\n\n\n# to create a Stretch Container\ncd /var/lib/machines \nmkdir \ndeboostrap stretch \n\n\n\n\nAfter some experimentation, perhaps this is the best time to write\nthe intended hostname into the container, and write any\napt-cacher or apt-cacher-ng proxies into /etc/apt/apt.conf \non the container.\n\n\ncp apt.conf /etc/apt/apt.conf \necho \"\" > /var/lib/machines//etc/hostname\n\n\n\n\nAnd then start the container, and set the root password.\n\n\n# boot in interactive mode\nsystemd-nspawn -D \n# set the passwd and logout\npassword \nlogout \n\n\n\n\nNow we can boot the container in non-interactive mode, either\nfrom the command line or using nspawn files. In either case \ndouble check that the your bind mounts have the correct permissions \nfrom inside the container.\n\n\n# for instance attached to a bridge interface br0 \nsystemd-nspawn -b -D --network-bridge=br0\n# or if you've set up a package cache \nsystemd-nspawn -b -D --network-bridge=br0 --bind=/var/cache/apt/archives\n\n\n\n\nAlternately, if you use an nspawn file, then you can use a command \nsimilar to the following to start it, you'll first need to \nboot the container from the command line and install dbus,\nbecause \nmachinectl shell\n and \nmachinectl login\n won't work \nwithout dbus. In this case use the following sequence of commands.\n\n\n# start the container and login as root\nsystemd-nspawn -b -D --network-bridge=br0 \n# bring up networking so you can install dbus\nsystemctl enable/start systemd-networkd\n# this is also a good time to install and configure locale\napt install dbus locales \n# to configure locale \ndpkg-reconfigure locales \npoweroff\n\n\n\n\nAfter this you can start the container with systemd, when \nusing an nspawn file.\n\n\nsystemctl start systemd-nspawn@\n\n\n\n\n# /etc/systemd/nspawn/.spawn \n[Files] \n# Bind=/var/cache/apt/archives \n\n[Network] \nbridge=br0 \n\n\n\n\nYou can use tasksel to install a web-server.\n\n\n# apache2 will immediately be listening on port 80\ntasksel install web-server\n# enable mod ssl\na2enmod ssl ; systemctl restart apache2\n# enable the default ssl test page \na2ensite default-ssl.conf ; systemctl reload apache2\n\n\n\n\nYou'll be up and running with the default self-signed certs.",
diff --git a/site/nspawn/index.html b/site/nspawn/index.html
index 0e53824..65d1308 100644
--- a/site/nspawn/index.html
+++ b/site/nspawn/index.html
@@ -86,6 +86,11 @@