Skip to content

Commit

Permalink
frh states:308 add node state for ilias instances >= 9
Browse files Browse the repository at this point in the history
  • Loading branch information
daniwe4 committed Mar 23, 2023
1 parent 7fc51e3 commit 972f375
Show file tree
Hide file tree
Showing 11 changed files with 41 additions and 9 deletions.
7 changes: 7 additions & 0 deletions app/src/Commands/Instances/CreateCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,13 @@ public function execute(InputInterface $input, OutputInterface $output) : int
$this->writer->endBlock();
}

// apply npm-update state
if ($ilias_version >= 9.0) {
$this->writer->beginBlock($output, "Apply nodejs state");
$this->docker->applyState($instance_salt_name, "nodejs");
$this->writer->endBlock();
}

// apply enable-xdebug state
if ($options['xdebug']) {
$this->writer->beginBlock($output, "Apply enable-xdebug state");
Expand Down
2 changes: 2 additions & 0 deletions setup/stack/config/master.cnf
Original file line number Diff line number Diff line change
Expand Up @@ -690,6 +690,8 @@ file_roots:
- /srv/salt/states/mailservices
proxyservices:
- /srv/salt/states/proxyservices
nodejs:
- /srv/salt/states/nodejs


# The master_roots setting configures a master-only copy of the file_roots dictionary,
Expand Down
9 changes: 0 additions & 9 deletions setup/stack/states/access/access/init.sls
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
{% set doil_host_system = salt['grains.get']('doil_host_system', 'linux') %}

packages_check:
pkg.installed:
- pkgs:
- ftp
- curl
- imagemagick
- ghostscript
- npm

/var/www/html/:
file.directory:
- user: www-data
Expand Down
21 changes: 21 additions & 0 deletions setup/stack/states/nodejs/nodejs/init.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
get_npm_by_curl:
cmd.run:
- name: curl -sL https://deb.nodesource.com/setup_16.x | bash -

install_node_js:
cmd.run:
- name: apt -y install nodejs
- watch:
- get_npm_by_curl

update_npm:
cmd.run:
- name: npm install -g [email protected]
- watch:
- install_node_js

install_ilias_npm_packages:
cmd.run:
- name: cd /var/www/html && npm install --ignore-scripts
- watch:
- update_npm
3 changes: 3 additions & 0 deletions setup/stack/states/nodejs/top.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
nodejs:
'*':
- nodejs
1 change: 1 addition & 0 deletions setup/stack/states/php7.2/php/init.sls
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ php{{ version }}:
- php{{ version }}-xmlrpc
- php{{ version }}-xsl
- php{{ version }}-zip
- php{{ version }}-imagick
{% endfor %}

ini_filesize_apache2:
Expand Down
1 change: 1 addition & 0 deletions setup/stack/states/php7.3/php/init.sls
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ php{{ version }}:
- php{{ version }}-xmlrpc
- php{{ version }}-xsl
- php{{ version }}-zip
- php{{ version }}-imagick
{% endfor %}

ini_filesize_apache2:
Expand Down
1 change: 1 addition & 0 deletions setup/stack/states/php7.4/php/init.sls
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ php{{ version }}:
- php{{ version }}-xmlrpc
- php{{ version }}-xsl
- php{{ version }}-zip
- php{{ version }}-imagick
{% endfor %}

ini_filesize_apache2:
Expand Down
1 change: 1 addition & 0 deletions setup/stack/states/php8.0/php/init.sls
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ php{{ version }}:
- php{{ version }}-xmlrpc
- php{{ version }}-xsl
- php{{ version }}-zip
- php{{ version }}-imagick
{% endfor %}

ini_filesize_apache2:
Expand Down
2 changes: 2 additions & 0 deletions setup/stack/states/php8.1/php/init.sls
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ php8.1:
- php8.1-xmlrpc
- php8.1-xsl
- php8.1-zip
- php8.1-imagick

{% for version in ['7.0','7.1','7.2','7.3','7.4','8.0','8.2'] %}
php{{ version }}:
Expand All @@ -57,6 +58,7 @@ php{{ version }}:
- php{{ version }}-xmlrpc
- php{{ version }}-xsl
- php{{ version }}-zip
- php{{ version }}-imagick
{% endfor %}

ini_filesize_apache2:
Expand Down
2 changes: 2 additions & 0 deletions setup/stack/states/php8.2/php/init.sls
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ php8.2:
- php8.2-xmlrpc
- php8.2-xsl
- php8.2-zip
- php8.2-imagick

{% for version in ['7.0','7.1','7.2','7.3','7.4','8.0','8.1'] %}
php{{ version }}:
Expand All @@ -57,6 +58,7 @@ php{{ version }}:
- php{{ version }}-xmlrpc
- php{{ version }}-xsl
- php{{ version }}-zip
- php{{ version }}-imagick
{% endfor %}

ini_filesize_apache2:
Expand Down

0 comments on commit 972f375

Please sign in to comment.