# - env: INSTANCE=default-amazonlinux-2-3000-3-py3 | # - env: INSTANCE=default-amazonlinux-2-3000-3-py3 | ||||
# - env: INSTANCE=default-ubuntu-1804-3000-3-py2 | # - env: INSTANCE=default-ubuntu-1804-3000-3-py2 | ||||
# - env: INSTANCE=default-ubuntu-1604-3000-3-py2 | # - env: INSTANCE=default-ubuntu-1604-3000-3-py2 | ||||
# - env: INSTANCE=default-arch-base-latest-3000-3-py2 | |||||
- env: INSTANCE=default-arch-base-latest-3000-3-py2 | |||||
# - env: INSTANCE=upstart-centos-6-2019-2-py2 | # - env: INSTANCE=upstart-centos-6-2019-2-py2 | ||||
# - env: INSTANCE=upstart-amazonlinux-1-2019-2-py2 | # - env: INSTANCE=upstart-amazonlinux-1-2019-2-py2 | ||||
- env: INSTANCE=mysql-debian-10-master-py3 | - env: INSTANCE=mysql-debian-10-master-py3 |
name: diaspora | name: diaspora | ||||
os: Debian, Ubuntu, RedHat, CentOS | |||||
os_family: Debian, RedHat | |||||
os: Debian, Ubuntu, RedHat, CentOS, Arch | |||||
os_family: Debian, RedHat, Arch | |||||
version: 0.1.0 | version: 0.1.0 | ||||
release: 1 | release: 1 | ||||
minimum_version: 2019.2 | minimum_version: 2019.2 |
- pkg: diaspora_dependencies | - pkg: diaspora_dependencies | ||||
{%- endif %} | {%- endif %} | ||||
{%- if grains.os_family == 'Arch' %} | |||||
diaspora_arch_install_devel_group: | |||||
pkg.group_installed: | |||||
- name: base-devel | |||||
- require_in: | |||||
- pkg: diaspora_dependencies | |||||
{%- endif %} | |||||
diaspora_dependencies: | diaspora_dependencies: | ||||
pkg.installed: | pkg.installed: | ||||
- pkgs: {{ diaspora.dependencies|json }} | - pkgs: {{ diaspora.dependencies|json }} |
environment: | environment: | ||||
certificate_authorities: /etc/pki/tls/certs/ca-bundle.crt | certificate_authorities: /etc/pki/tls/certs/ca-bundle.crt | ||||
libjemalloc: /usr/lib64/libjemalloc.so.2 | libjemalloc: /usr/lib64/libjemalloc.so.2 | ||||
Arch: | |||||
dependencies: | |||||
- git | |||||
- imagemagick | |||||
- net-tools | |||||
- libidn | |||||
- libxslt | |||||
- gsfonts | |||||
- nodejs | |||||
- jemalloc | |||||
postgresql_package: postgresql-libs | |||||
mysql_package: libmariadbclient | |||||
redis_package: redis | |||||
redis_service: redis | |||||
configuration: | |||||
environment: | |||||
certificate_authorities: /etc/ssl/certs/ca-certificates.crt | |||||
libjemalloc: /usr/lib/libjemalloc.so.2 |
# yamllint disable rule:indentation rule:line-length | |||||
# Arch | |||||
--- | |||||
configuration: | |||||
environment: | |||||
certificate_authorities: /etc/ssl/certs/ca-certificates.crt | |||||
url: https://example.org/ | |||||
server: | |||||
listen: 127.0.0.1:3000 | |||||
rails_environment: production | |||||
settings: | |||||
pod_name: example diaspora* pod | |||||
database: | |||||
database: diaspora | |||||
host: localhost | |||||
password: secret | |||||
type: postgresql | |||||
username: diaspora | |||||
dependencies: | |||||
- git | |||||
- imagemagick | |||||
- net-tools | |||||
- libidn | |||||
- libxslt | |||||
- gsfonts | |||||
- nodejs | |||||
- jemalloc | |||||
install_path: /srv/diaspora | |||||
install_redis: true | |||||
libjemalloc: /usr/lib/libjemalloc.so.2 | |||||
mysql_package: libmariadbclient | |||||
postgresql_package: postgresql-libs | |||||
redis_package: redis | |||||
redis_service: redis | |||||
repository: https://github.com/diaspora/diaspora.git | |||||
ruby_version: 2.6.6 | |||||
systemd: | |||||
web_template: salt://diaspora/files/diaspora-web.service | |||||
user: | |||||
shell: /bin/bash | |||||
username: diaspora | |||||
version: develop |
- platform-name: debian | - platform-name: debian | ||||
- platform-name: ubuntu | - platform-name: ubuntu | ||||
- platform-name: centos | - platform-name: centos | ||||
- platform-name: arch |
ca_file = | ca_file = | ||||
case platform[:family] | case platform[:family] | ||||
when 'debian' | |||||
when 'debian', 'arch' | |||||
'/etc/ssl/certs/ca-certificates.crt' | '/etc/ssl/certs/ca-certificates.crt' | ||||
when 'redhat' | when 'redhat' | ||||
'/etc/pki/tls/certs/ca-bundle.crt' | '/etc/pki/tls/certs/ca-bundle.crt' |
- platform-name: debian | - platform-name: debian | ||||
- platform-name: ubuntu | - platform-name: ubuntu | ||||
- platform-name: centos | - platform-name: centos | ||||
- platform-name: arch |
{% set pkg = salt['grains.filter_by']({ | {% set pkg = salt['grains.filter_by']({ | ||||
'Debian': 'postgresql', | 'Debian': 'postgresql', | ||||
'RedHat': 'postgresql-server', | 'RedHat': 'postgresql-server', | ||||
'Arch': 'postgresql', | |||||
}) -%} | }) -%} | ||||
pgsql_package: | pgsql_package: | ||||
- name: {{ pkg }} | - name: {{ pkg }} | ||||
{%- if grains.os_family == 'RedHat' %} | {%- if grains.os_family == 'RedHat' %} | ||||
pgsql_initdb: | |||||
pgsql_initdb_redhat: | |||||
cmd.run: | cmd.run: | ||||
- name: postgresql-setup initdb | - name: postgresql-setup initdb | ||||
- require: | - require: | ||||
- cmd: pgsql_initdb_redhat | - cmd: pgsql_initdb_redhat | ||||
- require_in: | - require_in: | ||||
- service: pgsql_service | - service: pgsql_service | ||||
{%- elif grains.os_family == 'Arch' %} | |||||
pgsql_initdb_arch: | |||||
cmd.run: | |||||
- name: initdb --locale en_US.UTF-8 -D '/var/lib/postgres/data' | |||||
- runas: postgres | |||||
- require: | |||||
- pkg: pgsql_package | |||||
- require_in: | |||||
- service: pgsql_service | |||||
{%- endif %} | {%- endif %} | ||||
pgsql_service: | pgsql_service: |
{%- if grains.osfinger == 'Ubuntu-18.04' %} | |||||
{%- if grains.get('osfinger', grains.os) == 'Ubuntu-18.04' %} | |||||
redis_config: | redis_config: | ||||
file.replace: | file.replace: | ||||
- name: '/etc/redis/redis.conf' | - name: '/etc/redis/redis.conf' |