Sfoglia il codice sorgente

feat(arch): add support for archlinux

tags/v1.0.0
Benjamin Neff 4 anni fa
parent
commit
7571d3d577
Nessun account collegato all'indirizzo email del committer
10 ha cambiato i file con 87 aggiunte e 6 eliminazioni
  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 Vedi File

@@ -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 Vedi File

@@ -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 Vedi File

@@ -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 Vedi File

@@ -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 Vedi File

@@ -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 Vedi File

@@ -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 Vedi File

@@ -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 Vedi File

@@ -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 Vedi File

@@ -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 Vedi File

@@ -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…
Annulla
Salva