Selaa lähdekoodia

feat(arch): add support for archlinux

tags/v1.0.0
Benjamin Neff 4 vuotta sitten
vanhempi
commit
7571d3d577
No account linked to committer's email address
10 muutettua tiedostoa jossa 87 lisäystä ja 6 poistoa
  1. +1
    -1
      .travis.yml
  2. +2
    -2
      FORMULA
  3. +8
    -0
      diaspora/install.sls
  4. +19
    -0
      diaspora/osfamilymap.yaml
  5. +42
    -0
      test/integration/_mapdata/files/_mapdata/arch-base-latest.yaml
  6. +1
    -0
      test/integration/_mapdata/inspec.yml
  7. +1
    -1
      test/integration/default/controls/config_spec.rb
  8. +1
    -0
      test/integration/default/inspec.yml
  9. +11
    -1
      test/salt/states/postgres/init.sls
  10. +1
    -1
      test/salt/states/redis/init.sls

+ 1
- 1
.travis.yml Näytä tiedosto

@@ -123,7 +123,7 @@ jobs:
# - env: INSTANCE=default-amazonlinux-2-3000-3-py3
# - env: INSTANCE=default-ubuntu-1804-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-amazonlinux-1-2019-2-py2
- env: INSTANCE=mysql-debian-10-master-py3

+ 2
- 2
FORMULA Näytä tiedosto

@@ -1,6 +1,6 @@
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
release: 1
minimum_version: 2019.2

+ 8
- 0
diaspora/install.sls Näytä tiedosto

@@ -14,6 +14,14 @@ diaspora_centos_enable_powertools_repo:
- pkg: diaspora_dependencies
{%- 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:
pkg.installed:
- pkgs: {{ diaspora.dependencies|json }}

+ 19
- 0
diaspora/osfamilymap.yaml Näytä tiedosto

@@ -63,3 +63,22 @@ RedHat:
environment:
certificate_authorities: /etc/pki/tls/certs/ca-bundle.crt
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

+ 42
- 0
test/integration/_mapdata/files/_mapdata/arch-base-latest.yaml Näytä tiedosto

@@ -0,0 +1,42 @@
# 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

+ 1
- 0
test/integration/_mapdata/inspec.yml Näytä tiedosto

@@ -13,3 +13,4 @@ supports:
- platform-name: debian
- platform-name: ubuntu
- platform-name: centos
- platform-name: arch

+ 1
- 1
test/integration/default/controls/config_spec.rb Näytä tiedosto

@@ -28,7 +28,7 @@ control 'diaspora configuration' do

ca_file =
case platform[:family]
when 'debian'
when 'debian', 'arch'
'/etc/ssl/certs/ca-certificates.crt'
when 'redhat'
'/etc/pki/tls/certs/ca-bundle.crt'

+ 1
- 0
test/integration/default/inspec.yml Näytä tiedosto

@@ -13,3 +13,4 @@ supports:
- platform-name: debian
- platform-name: ubuntu
- platform-name: centos
- platform-name: arch

+ 11
- 1
test/salt/states/postgres/init.sls Näytä tiedosto

@@ -1,6 +1,7 @@
{% set pkg = salt['grains.filter_by']({
'Debian': 'postgresql',
'RedHat': 'postgresql-server',
'Arch': 'postgresql',
}) -%}

pgsql_package:
@@ -8,7 +9,7 @@ pgsql_package:
- name: {{ pkg }}

{%- if grains.os_family == 'RedHat' %}
pgsql_initdb:
pgsql_initdb_redhat:
cmd.run:
- name: postgresql-setup initdb
- require:
@@ -22,6 +23,15 @@ pgsql_pg_hba_redhat:
- cmd: pgsql_initdb_redhat
- require_in:
- 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 %}

pgsql_service:

+ 1
- 1
test/salt/states/redis/init.sls Näytä tiedosto

@@ -1,4 +1,4 @@
{%- if grains.osfinger == 'Ubuntu-18.04' %}
{%- if grains.get('osfinger', grains.os) == 'Ubuntu-18.04' %}
redis_config:
file.replace:
- name: '/etc/redis/redis.conf'

Loading…
Peruuta
Tallenna