Page MenuHomeDevCentral

D2384.id6015.diff
No OneTemporary

D2384.id6015.diff

diff --git a/map.jinja b/map.jinja
--- a/map.jinja
+++ b/map.jinja
@@ -136,7 +136,7 @@
'RedHat': {
'ag': 'the_silver_searcher',
'aspell-fr': 'aspell-fr',
- 'certbot': 'python2-certbot',
+ 'certbot': 'python3-certbot',
'cppunit': 'cppunit-devel',
'exiftool': 'perl-Image-ExifTool',
'jpeg-turbo' : 'libjpeg-turbo',
@@ -171,7 +171,7 @@
'aspell-fr': 'fr-aspell',
'aspell-en': 'en-aspell',
'boost': 'boost-all',
- 'certbot': 'py27-certbot',
+ 'certbot': 'py37-certbot',
'composer': 'php-composer',
'cppunit': 'cppunit',
'exiftool': 'p5-Image-ExifTool-devel',
diff --git a/pillar/core/users.sls b/pillar/core/users.sls
--- a/pillar/core/users.sls
+++ b/pillar/core/users.sls
@@ -114,7 +114,8 @@
- ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB9u1AFDK0mo7bDQZAiV9AXXdxUiH8H1B0rLY8NIP8/f yggdrasil.dereckson.drake
yubico_keys:
- ccccccbjncrt
- deploy_dotfiles_to_devserver: True
+ devserver_tasks:
+ - deploy_dotfiles
uid: 5001
erol:
diff --git a/pillar/paas/docker.sls b/pillar/paas/docker.sls
--- a/pillar/paas/docker.sls
+++ b/pillar/paas/docker.sls
@@ -27,9 +27,6 @@
# Core services
- nasqueron/mysql:5.7
- # Infrastructure and development services
- - nasqueron/notifications
-
docker-001:
# Core services
- library/postgres
@@ -52,6 +49,7 @@
- nasqueron/aphlict
- nasqueron/cachet
- nasqueron/etherpad:production
+ - nasqueron/notifications
- nasqueron/phabricator
# Continuous deployment jobs
@@ -144,23 +142,6 @@
network: bugzilla
version: 5.7
- #
- # Notifications center
- #
-
- notifications:
- notifications:
- host: notifications.nasqueron.org
- app_port: 37080
- broker_link: white-rabbit
- credentials:
- broker: nasqueron.notifications.broker
- mailgun: nasqueron.notifications.mailgun
- sentry:
- realm: nasqueron
- project_id: 2
- credential: nasqueron.notifications.sentry
-
#
# Bugzilla
#
@@ -294,6 +275,19 @@
# Infrastructure and development services
+ notifications:
+ notifications:
+ host: notifications.nasqueron.org
+ app_port: 37080
+ broker_link: white-rabbit
+ credentials:
+ broker: nasqueron.notifications.broker
+ mailgun: nasqueron.notifications.mailgun
+ sentry:
+ realm: nasqueron
+ project_id: 2
+ credential: nasqueron.notifications.sentry
+
phabricator:
# Nasqueron instance
devcentral:
diff --git a/pillar/viperserv/fantoir.sls b/pillar/viperserv/fantoir.sls
--- a/pillar/viperserv/fantoir.sls
+++ b/pillar/viperserv/fantoir.sls
@@ -7,6 +7,6 @@
# ------------------------------------------------------------
fantoir:
- dataset_url: http://www.data.gouv.fr/fr/datasets/r/008e7b8f-f52c-4dc6-89ca-3bed2b103746
- dataset_hash: 4915aead5c3901cb6808137217a94b1e14a8e3d5
- distname: FANTOIR1017
+ dataset_url: https://www.data.gouv.fr/fr/datasets/r/66a699c0-90c4-4396-b738-cd02ee52e0b1
+ dataset_hash: f60a3b4e436b2520f8cac73807b41dd97be74fcf6a8a016174f4b04aaa2ed0a6
+ distname: FANTOIR1020
diff --git a/requirements.txt b/requirements.txt
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,12 +1,12 @@
# Linters
-flake8>=3.7.9,<4.0
-autopep8>=1.4.4,<2.0
-pycodestyle>=2.5.0,<3.0
+flake8>=3.9.2,<4.0
+autopep8>=1.5.7,<2.0
+pycodestyle>=2.7.0,<3.0
# Tests and utilities
-PyYAML>=4.2b1,<5.1
+PyYAML>=5.4.1,<6.0
# Tests
-mock>=2.0.0,<3.0
-salt==2019.2.2
-jsondiff==1.2.0
+mock>=4.0.3,<5.0
+json==3003
+jsondiff==1.3.0
diff --git a/roles/core/userland-software/files/720.portsnap b/roles/core/userland-software/files/720.portsnap
new file mode 100755
--- /dev/null
+++ b/roles/core/userland-software/files/720.portsnap
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+# -------------------------------------------------------------
+# Fetch ports
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Project: Nasqueron
+# Author : FreeBSD contributors
+# License: BSD-2-Clause
+# Source file: roles/core/userland-software/files/720.portsnap
+# -------------------------------------------------------------
+#
+# <auto-generated>
+# This file is managed by our rOPS SaltStack repository.
+#
+# Changes to this file may cause incorrect behavior
+# and will be lost if the state is redeployed.
+# </auto-generated>
+# -------------------------------------------------------------
+
+
+# If there is a global system configuration file, suck it in.
+#
+if [ -r /etc/defaults/periodic.conf ]
+then
+ . /etc/defaults/periodic.conf
+ source_periodic_confs
+fi
+
+case "$daily_portsnap_enable" in
+ [Yy][Ee][Ss])
+ echo ""
+ echo "Running portsnap:"
+
+ portsnap auto && rc=0 || rc=3;;
+
+ *) rc=0;;
+esac
+
+exit $rc
diff --git a/roles/core/userland-software/init.sls b/roles/core/userland-software/init.sls
--- a/roles/core/userland-software/init.sls
+++ b/roles/core/userland-software/init.sls
@@ -41,6 +41,12 @@
- target: /var/lib/snapd/snap
{% endif %}
+{% if grains['os'] == 'FreeBSD' %}
+/etc/periodioc/daily/720.portsnap:
+ file.managed:
+ - source: salt://roles/core/userland-software/files/720.portsnap
+{% endif %}
+
# -------------------------------------------------------------
# Shells
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
diff --git a/roles/devserver/userland-home/homefiles.sls b/roles/devserver/userland-home/homefiles.sls
--- a/roles/devserver/userland-home/homefiles.sls
+++ b/roles/devserver/userland-home/homefiles.sls
@@ -7,14 +7,17 @@
# -------------------------------------------------------------
{% for username, user in salt['forest.get_users']().items() %}
-{% if 'deploy_dotfiles_to_devserver' in user %}
+{% set tasks = user.get('devserver_tasks', []) }
+
+{% if 'deploy_dotfiles' in tasks %}
dotfiles_to_devserver_{{username}}:
file.recurse:
- name: /home/{{ username }}
- - source: salt://roles/devserver/userland-home/files/dereckson
+ - source: salt://roles/devserver/userland-home/files/{{ username }}
- include_empty: True
- clean: False
- user: {{ username }}
- group: {{ username }}
{% endif %}
+
{% endfor %}
diff --git a/roles/devserver/userland-software/dev.sls b/roles/devserver/userland-software/dev.sls
--- a/roles/devserver/userland-software/dev.sls
+++ b/roles/devserver/userland-software/dev.sls
@@ -73,6 +73,7 @@
pkg.installed:
- pkgs:
- {{ packages.phpunit }}
+ - {{ packages_prefixes.pecl }}ast
# -------------------------------------------------------------
# Python
diff --git a/roles/devserver/userland-software/files/ast.ini b/roles/devserver/userland-software/files/ast.ini
deleted file mode 100644
--- a/roles/devserver/userland-software/files/ast.ini
+++ /dev/null
@@ -1,16 +0,0 @@
-; -------------------------------------------------------------
-; PHP configuration
-; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-; Project: Nasqueron
-; License: Trivial work, not eligible to copyright
-; Source file: roles/devserver/userland-software/files/ast.ini
-; -------------------------------------------------------------
-;
-; <auto-generated>
-; This file is managed by our rOPS SaltStack repository.
-;
-; Changes to this file may cause incorrect behavior
-; and will be lost if the state is redeployed.
-; </auto-generated>
-
-extension=ast.so
diff --git a/roles/devserver/userland-software/files/install-php-extension.sh b/roles/devserver/userland-software/files/install-php-extension.sh
deleted file mode 100755
--- a/roles/devserver/userland-software/files/install-php-extension.sh
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/sh
-
-# -------------------------------------------------------------
-# Install PHP extension
-# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-# Project: Nasqueron
-# Author: Sébastien Santoro aka Dereckson
-# Created: 2018-03-29
-# License: BSD-2-Clause
-# Source file: roles/devserver/userland-software/files/install-php-extension.sh
-# -------------------------------------------------------------
-
-AS_BUILDER="sudo -u builder"
-
-$AS_BUILDER phpize
-$AS_BUILDER ./configure
-$AS_BUILDER make
diff --git a/roles/devserver/userland-software/init.sls b/roles/devserver/userland-software/init.sls
--- a/roles/devserver/userland-software/init.sls
+++ b/roles/devserver/userland-software/init.sls
@@ -20,6 +20,5 @@
- .misc
- .notifications
- .phabricator
- - .php-ast
- .psysh
- .wordpress
diff --git a/roles/devserver/userland-software/php-ast.sls b/roles/devserver/userland-software/php-ast.sls
deleted file mode 100644
--- a/roles/devserver/userland-software/php-ast.sls
+++ /dev/null
@@ -1,47 +0,0 @@
-# -------------------------------------------------------------
-# Salt — Provision dev software
-# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-# Project: Nasqueron
-# Created: 2018-03-29
-# License: Trivial work, not eligible to copyright
-# -------------------------------------------------------------
-
-{% from "roles/devserver/userland-software/map.jinja" import php with context %}
-
-# -------------------------------------------------------------
-# Fetch software
-# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-/opt/php-ast:
- file.directory:
- - user: builder
-
-php_ast_repository:
- git.latest:
- - name: https://github.com/nikic/php-ast.git
- - target: /opt/php-ast
- - user: builder
-
-# -------------------------------------------------------------
-# Build software
-# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-php_ast_build:
- cmd.script:
- - source: salt://roles/devserver/userland-software/files/install-php-extension.sh
- - cwd: /opt/php-ast
- - creates: /opt/php-ast/modules/ast.so
-
-php_ast_install:
- cmd.run:
- - name: make install
- - cwd: /opt/php-ast
- - creates: {{ php.extension_dir }}/ast.so
-
-# -------------------------------------------------------------
-# PHP configuration
-# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-{{ php.cli_conf_dir }}/ext-40-ast.ini:
- file.managed:
- - source: salt://roles/devserver/userland-software/files/ast.ini
diff --git a/roles/paas-docker/devel/files/arc.sh b/roles/paas-docker/devel/files/arc.sh
--- a/roles/paas-docker/devel/files/arc.sh
+++ b/roles/paas-docker/devel/files/arc.sh
@@ -8,6 +8,7 @@
# Created: 2016-01-01
# Description: Wrapper to run Arcanist as a Docker container
# License: Trivial work, not eligible to copyright
+# If copyright eligible, BSD-2-Clause
# Image: nasqueron/arcanist
# Source file: roles/paas-docker/devel/files/arc.sh
# -------------------------------------------------------------
@@ -19,6 +20,8 @@
# and will be lost if the state is redeployed.
# </auto-generated>
+BASE_IMAGE=nasqueron/arcanist
+
# -------------------------------------------------------------
# Parse arguments
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -33,11 +36,15 @@
# Logs are default disabled
PRINT_LOG=0
+UPDATE_MODE=0
+
if [ "$1" = "shell" ]; then
# Launch commands
# in the container bash shell
shift
COMMAND=bash
+elif [ "$1" = "update" ]; then
+ UPDATE_MODE=1
else
# Launch arc
mkdir -p ~/.arc
@@ -60,7 +67,7 @@
BUILD_DIR=$(mktemp -d -t arc-build-XXXXXXXXXX)
pushd "$BUILD_DIR" > /dev/null || exit 1
>&2 echo "🔨 Building user-specific image $IMAGE for $USER"
- echo "FROM nasqueron/arcanist" > Dockerfile
+ echo "FROM $BASE_IMAGE" > Dockerfile
echo "RUN groupadd -r $USER -g $GID && mkdir /home/$USER && useradd -u $UID -r -g $USER -d /home/$USER -s /bin/bash $USER && cp /root/.bashrc /home/$USER/ && chown -R $USER:$USER /home/$USER && ln -s /opt/config/gitconfig /home/$USER/.gitconfig && ln -s /opt/config/arcrc /home/$USER/.arcrc" >> Dockerfile
docker build -t "$IMAGE" .
popd > /dev/null
@@ -70,11 +77,21 @@
test -v $UID && UID=$(id -u)
test -v $GID && GID=$(id -g)
+if [ $UPDATE_MODE -eq 1 ]; then
+ docker pull $BASE_IMAGE
+
+ # Rebuild user image
+ IMAGE=$BASE_IMAGE:$UID-$GID
+ test $UID -eq 0 || build_user_image
+
+ exit
+fi
+
if [ $UID -eq 0 ]; then
- IMAGE=nasqueron/arcanist
+ IMAGE=$BASE_IMAGE
CONTAINER_USER_HOME=/root
else
- IMAGE=nasqueron/arcanist:$UID-$GID
+ IMAGE=$BASE_IMAGE:$UID-$GID
test ! -z $(docker images -q "$IMAGE") || build_user_image
CONTAINER_USER_HOME="/home/$USER"
fi
diff --git a/roles/paas-docker/wrappers/files/certbot.sh b/roles/paas-docker/wrappers/files/certbot.sh
--- a/roles/paas-docker/wrappers/files/certbot.sh
+++ b/roles/paas-docker/wrappers/files/certbot.sh
@@ -29,4 +29,4 @@
-v /srv/letsencrypt/var:/var/lib/letsencrypt \
-v /srv/letsencrypt/log:/var/log/letsencrypt \
-v /srv/letsencrypt/www:/www \
- certbot/certbot:latest "$COMMAND" "$@" "$EXTRA_ARGS"
+ certbot/certbot:latest "$COMMAND" $@ $EXTRA_ARGS

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 23, 12:10 (17 h, 43 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2257945
Default Alt Text
D2384.id6015.diff (13 KB)

Event Timeline