Page MenuHomeDevCentral

D2374.id5976.diff
No OneTemporary

D2374.id5976.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/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/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-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

File Metadata

Mime Type
text/plain
Expires
Mon, Dec 23, 13:26 (11 h, 41 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2312531
Default Alt Text
D2374.id5976.diff (10 KB)

Event Timeline