Skip to content

Commit

Permalink
#243 bump EC2-create to use official Rocky 9.1 AMI
Browse files Browse the repository at this point in the history
  • Loading branch information
Don Sizemore committed Dec 12, 2022
1 parent 8a81192 commit dd03971
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 33 deletions.
6 changes: 3 additions & 3 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,8 @@ dataverse:
request_timeout: 1800
root: /usr/local
dir: payara5
zipurl: https://s3-eu-west-1.amazonaws.com/payara.fish/Payara+Downloads/5.2021.6/payara-5.2021.6.zip
zipchecksum: sha256:635af1750cf291b800e98067bd80dfefd80608ee6709215671d11f115e94ff96
zipurl: https://s3-eu-west-1.amazonaws.com/payara.fish/Payara+Downloads/5.2022.3/payara-5.2022.3.zip
zipchecksum: sha256:4088221274882de792fda0836ddd47f0550f896e44c62174579c2c70a1177a5d
google_analytics_key:
jacoco:
enabled: false
Expand Down Expand Up @@ -200,7 +200,7 @@ dataverse:
enabled: false
argument: '-DcompilerArgument=-Xlint:unchecked test -P all-unit-tests'
usermgmtkey: burrito
version: '5.11.1'
version: '5.12.1'

build_guides: false

Expand Down
4 changes: 2 additions & 2 deletions ec2/ec2-create-instance.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ BRANCH_DEFAULT="develop"
PEM_DEFAULT=${HOME}
VERBOSE_ARG=""

# rocky linux 9.0 official, us-east-1
AWS_AMI_DEFAULT='ami-0ae4df53d376e5d3b'
# rocky linux 9.1 official, us-east-1
AWS_AMI_DEFAULT='ami-0cce0fd28f5ae1c16'

usage() {
echo "Usage: $0 -b <branch> -r <repo> -p <pem_path> -g <group_vars> -a <dataverse-ansible branch> -i aws_image -u aws_user -s aws_size -t aws_tag -f aws_security group -e aws_profile -l local_log_path -d -v" 1>&2
Expand Down
43 changes: 24 additions & 19 deletions tasks/rserve.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,22 +31,19 @@
name: "{{ packages }}"
vars:
packages:
- R-core
- R-core-devel
- R-core
- R-core-devel
when: ansible_os_family == "RedHat"

- name: install base packages on Debian
apt:
name: r-base-core, r-base-dev
state: latest
when:
- ansible_distribution == "Debian"

- name: install base packages on Debian/Ubuntu ## we hope bullseye and others will have a good version (Ubuntu 20.04 has R 3.6) -- if not, we will need further handlers for them
- name: install base packages on Debian/Ubuntu
package:
name: r-base-core, r-base-dev
name:
- r-base-core
- r-base-dev
- libssl-dev
- libcurl4-openssl-dev
when:
- ansible_os_family == "Debian"
- ansible_os_family == "Debian"

- name: detect number of system cores
set_fact:
Expand All @@ -65,13 +62,15 @@
create: yes

- name: detect installed R modules
command: /usr/bin/Rscript --slave --no-save --no-restore-history -e "if (! ('{{item}}' %in% installed.packages()[,'Package'])) print('{{item}}')"
command: >
/usr/bin/Rscript --slave --no-save --no-restore-history -e
"if (! ('{{item}}' %in% installed.packages()[,'Package'])) print('{{item}}')"
with_items:
- R2HTML
- rjson
- DescTools
- Rserve
- haven
- R2HTML
- rjson
- DescTools
- Rserve
- haven
register: not_installed_r_modules
changed_when: false ## this just for registering a variable, it does not change anyting by itself

Expand All @@ -82,8 +81,14 @@

- debug: msg='The following modules are not installed -- {{ modules_to_install }}'

# The second if-statement in this command makes this task fail,
# if the installtion of the R package fails.
# It follows the example given here https://stackoverflow.com/a/52638148/2862719
- name: install R modules
command: /usr/bin/Rscript --slave --no-save --no-restore-history -e "install.packages('{{ item }}', repos=c('https://cloud.r-project.org/', Ncpus='{{ num_cores }}', quiet=TRUE))"
command: >
/usr/bin/Rscript --slave --no-save --no-restore-history -e
"install.packages('{{ item }}', repos=c('https://cloud.r-project.org/', Ncpus='{{ num_cores }}', quiet=TRUE));
if(!library('{{ item }}', character.only=TRUE, logical.return=TRUE)){quit(status=1, save='no')};"
with_items: "{{ modules_to_install }}"
when: modules_to_install is defined

Expand Down
6 changes: 3 additions & 3 deletions tests/group_vars/jenkins.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ dataverse:
siteurl:
root: /usr/local
dir: payara5
zipurl: https://s3-eu-west-1.amazonaws.com/payara.fish/Payara+Downloads/5.2021.6/payara-5.2021.6.zip
zipchecksum: sha256:635af1750cf291b800e98067bd80dfefd80608ee6709215671d11f115e94ff96
zipurl: https://s3-eu-west-1.amazonaws.com/payara.fish/Payara+Downloads/5.2022.3/payara-5.2022.3.zip
zipchecksum: sha256:4088221274882de792fda0836ddd47f0550f896e44c62174579c2c70a1177a5d
google_analytics_key:
jacoco:
enabled: true
Expand Down Expand Up @@ -191,7 +191,7 @@ dataverse:
enabled: true
argument: '-DcompilerArgument=-Xlint:unchecked test -P all-unit-tests'
usermgmtkey: burrito
version: '5.11.1'
version: '5.12.1'

build_guides: false

Expand Down
6 changes: 3 additions & 3 deletions tests/group_vars/memorytests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,8 @@ dataverse:
request_timeout: 1800
root: /usr/local
dir: payara5
zipurl: https://s3-eu-west-1.amazonaws.com/payara.fish/Payara+Downloads/5.2021.6/payara-5.2021.6.zip
zipchecksum: sha256:635af1750cf291b800e98067bd80dfefd80608ee6709215671d11f115e94ff96
zipurl: https://s3-eu-west-1.amazonaws.com/payara.fish/Payara+Downloads/5.2022.3/payara-5.2022.3.zip
zipchecksum: sha256:4088221274882de792fda0836ddd47f0550f896e44c62174579c2c70a1177a5d
google_analytics_key:
jacoco:
enabled: false
Expand Down Expand Up @@ -194,7 +194,7 @@ dataverse:
enabled: false
argument: '-DcompilerArgument=-Xlint:unchecked test -P all-unit-tests'
usermgmtkey: burrito
version: '5.11.1'
version: '5.12.1'

build_guides: false

Expand Down
6 changes: 3 additions & 3 deletions tests/group_vars/vagrant.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ dataverse:
siteurl: http://0.0.0.0
root: /usr/local
dir: payara5
zipurl: https://s3-eu-west-1.amazonaws.com/payara.fish/Payara+Downloads/5.2021.6/payara-5.2021.6.zip
zipchecksum: sha256:635af1750cf291b800e98067bd80dfefd80608ee6709215671d11f115e94ff96
zipurl: https://s3-eu-west-1.amazonaws.com/payara.fish/Payara+Downloads/5.2022.3/payara-5.2022.3.zip
zipchecksum: sha256:4088221274882de792fda0836ddd47f0550f896e44c62174579c2c70a1177a5d
google_analytics_key:
jacoco:
enabled: false
Expand Down Expand Up @@ -196,7 +196,7 @@ dataverse:
enabled: true
argument: '-DcompilerArgument=-Xlint:unchecked test -P all-unit-tests'
usermgmtkey: burrito
version: '5.11.1'
version: '5.12.1'

build_guides: false

Expand Down

0 comments on commit dd03971

Please sign in to comment.