Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/src/App.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

class App extends Application
{
const NAME = "Doil Version 20251103 - build 2025-11-03";
const NAME = "Doil Version 20251125 - build 2025-11-25";

public function __construct(Command ...$commands)
{
Expand Down
4 changes: 4 additions & 0 deletions app/src/Commands/Instances/CreateCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,10 @@ public function execute(InputInterface $input, OutputInterface $output) : int
sleep(5);
$this->docker->executeDockerCommand($instance_name, "/etc/init.d/mariadb stop");

$this->docker->executeDockerCommand($instance_name, "rm -rf /etc/apt/sources.list.de/salt.list");
$this->docker->executeDockerCommand($instance_name, "curl -fsSL https://packages.broadcom.com/artifactory/api/security/keypair/SaltProjectKey/public | tee /etc/apt/keyrings/salt-archive-keyring.pgp");
$this->docker->executeDockerCommand($instance_name, "curl -fsSL https://github.com/saltstack/salt-install-guide/releases/latest/download/salt.sources | tee /etc/apt/sources.list.d/salt.sources");

$this->docker->copy($instance_name, "/var/log/apache2/", $instance_path . "/volumes/logs/");
$this->docker->copy($instance_name, "/etc/mysql/", $instance_path . "/volumes/etc/");
$this->docker->copy($instance_name, "/var/lib/mysql/", $instance_path . "/volumes/");
Expand Down
4 changes: 4 additions & 0 deletions app/src/Commands/Pack/PackCreateCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,10 @@ public function execute(InputInterface $input, OutputInterface $output) : int
sleep(5);
$this->docker->executeDockerCommand($instance_name, "/etc/init.d/mariadb stop");

$this->docker->executeDockerCommand($instance_name, "rm -rf /etc/apt/sources.list.de/salt.list");
$this->docker->executeDockerCommand($instance_name, "curl -fsSL https://packages.broadcom.com/artifactory/api/security/keypair/SaltProjectKey/public | tee /etc/apt/keyrings/salt-archive-keyring.pgp");
$this->docker->executeDockerCommand($instance_name, "curl -fsSL https://github.com/saltstack/salt-install-guide/releases/latest/download/salt.sources | tee /etc/apt/sources.list.d/salt.sources");

$this->docker->copy($instance_name, "/var/log/apache2/", $instance_path . "/volumes/logs/");
$this->docker->copy($instance_name, "/etc/mysql/", $instance_path . "/volumes/etc/");
$this->docker->copy($instance_name, "/var/lib/mysql/", $instance_path . "/volumes/");
Expand Down
12 changes: 10 additions & 2 deletions setup/stack/states/nodejs/nodejs/init.sls
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
{% set ilias_version = salt['grains.get']('ilias_version', '9') %}
{% if ilias_version | int < 10 %}
{% set node = 'https://deb.nodesource.com/setup_16.x' %}
{% set npm = 'npm@9.6.2' %}
{% else %}
{% set node = 'https://deb.nodesource.com/setup_22.x' %}
{% set npm = 'npm@10.9.3' %}
{% endif %}

get_npm_by_curl:
cmd.run:
- name: curl -sL https://deb.nodesource.com/setup_16.x | bash -
- name: curl -sL {{ node }} | bash -

install_node_js:
cmd.run:
Expand All @@ -11,7 +19,7 @@ install_node_js:

update_npm:
cmd.run:
- name: npm install -g npm@9.6.2
- name: npm install -g {{ npm }}
- watch:
- install_node_js

Expand Down
32 changes: 32 additions & 0 deletions setup/updates/update-20251125.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/usr/bin/env bash

doil_update_20251125() {
cp -r ${SCRIPT_DIR}/../app/src/* /usr/local/lib/doil/app/src/
cp -r ${SCRIPT_DIR}/../setup/stack/states/nodejs/* /usr/local/share/doil/stack/states/nodejs/

if [ $(docker ps -a --filter "name=_local" --filter "name=_global" --format "{{.Names}}" | wc -l) -gt 0 ]
then
for INSTANCE in $(docker ps -a --filter "name=_local" --filter "name=_global" --format "{{.Names}}")
do
NAME=${INSTANCE%_*}
SUFFIX=${INSTANCE##*_}
GLOBAL=""
if [ "${SUFFIX}" == "global" ]
then
GLOBAL="-g"
fi

doil up ${NAME} ${GLOBAL} &> /dev/null
sleep 5

doil_status_send_message "Apply state ilias to ${NAME}"
docker exec -it "${INSTANCE}" /bin/bash -c "rm -rf /etc/apt/sources.list.d/salt.list" &> /dev/null
docker exec -it "${INSTANCE}" /bin/bash -c "salt 'curl -fsSL https://packages.broadcom.com/artifactory/api/security/keypair/SaltProjectKey/public | tee /etc/apt/keyrings/salt-archive-keyring.pgp" &> /dev/null
docker exec -it "${INSTANCE}" /bin/bash -c "salt 'curl -fsSL https://github.com/saltstack/salt-install-guide/releases/latest/download/salt.sources | tee /etc/apt/sources.list.d/salt.sources" &> /dev/null
doil_status_okay

docker stop ${INSTANCE} &> /dev/null
done
fi
return $?
}