-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgoss.yaml.jinja2
More file actions
109 lines (103 loc) · 3.72 KB
/
Copy pathgoss.yaml.jinja2
File metadata and controls
109 lines (103 loc) · 3.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
{#-
Below are imports for Bakery's macros. If any are unneeded, they can be removed.
Bakery handles bootstrapping the files into template rendering.
-#}
{%- import "python.j2" as python -%}
{%- import "r.j2" as r -%}
{%- set clean_version = Image.Version | stripMetadata -%}
{%- set version_split = clean_version.split('.') -%}
{%- set major_version = version_split[0]|int -%}
{%- set minor_version = version_split[1]|int -%}
{%- set fix_version = version_split[2]|int -%}
user:
rstudio-pm:
exists: true
uid: {% raw %}{{ if eq .Env.IMAGE_OS_FAMILY "rhel" }}998{{ else }}999{{ end }}{% endraw %}
gid: {% raw %}{{ if eq .Env.IMAGE_OS_FAMILY "rhel" }}997{{ else }}999{{ end }}{% endraw %}
group:
rstudio-pm:
exists: true
gid: {% raw %}{{ if eq .Env.IMAGE_OS_FAMILY "rhel" }}997{{ else }}999{{ end }}{% endraw %}
package:
rstudio-pm:
installed: true
{% raw -%}
{{ $apt_package_list_path := printf "/tmp/version/deps/%s-%s_packages.txt" (toLower .Env.IMAGE_OS_NAME) .Env.IMAGE_OS_VERSION }}
{{ $apt_package_list := readFile $apt_package_list_path | splitList "\n" }}
{{- range $apt_package_list }}
{{ . }}:
installed: true
{{ end }}
{%- endraw %}
process:
rstudio-pm:
running: true
skip: {% raw %}{{ if eq .Env.IMAGE_VARIANT "Minimal" }}true{{ else }}false{{ end }}{% endraw %}
port:
tcp6:4242:
listening: true
skip: {% raw %}{{ if eq .Env.IMAGE_VARIANT "Minimal" }}true{{ else }}false{{ end }}{% endraw %}
file:
/etc/rstudio-pm/license.lic:
# Currently does not exist
# Be sure it is NOT a directory
exists: false
/opt/rstudio-pm/:
exists: true
/opt/rstudio-pm/bin/rstudio-pm:
exists: true
/opt/rstudio-pm/bin/rspm:
exists: true
/usr/local/bin/rspm:
exists: true
{% if major_version > 2024 or (major_version == 2024 and minor_version >= 8) -%}
{% raw %}{{ if eq .Env.IMAGE_VARIANT "Standard" }}
/var/log/rstudio/rstudio-pm/rstudio-pm.log:
exists: true
filetype: file
contents:
- "Posit Package Manager service is ready"
{{ end }}{% endraw %}
{%- endif %}
# Check for R installation
{% for r_version in Dependencies.R -%}
/opt/R/{{ r_version }}/bin/R:
exists: {% raw %}{{ if eq .Env.IMAGE_VARIANT "Standard" }}true{{ else }}false{{ end }}{% endraw %}
filetype: file
{%- endfor %}
# Check for Python installation
{% for python_version in Dependencies.python -%}
{{ python.get_version_directory(python_version) }}/bin/python:
exists: {% raw %}{{ if eq .Env.IMAGE_VARIANT "Standard" }}true{{ else }}false{{ end }}{% endraw %}
{%- endfor %}
/etc/rstudio-pm/rstudio-pm.gcfg:
exists: true
filetype: file
{% raw %}{{ if eq .Env.IMAGE_VARIANT "Standard" }}{% endraw %}
contents:
- RVersion = {{ r.get_version_directory(Dependencies.R.0) }}
- PythonVersion = {{ python.get_version_directory(Dependencies.python.0) }}/bin/python
- "AllowUnsandboxedGitBuilds = true"
{% raw %}{{ end }}{% endraw %}
command:
"Ensure Package Manager version is correct":
exec: /opt/rstudio-pm/bin/rstudio-pm --version
exit-status: 0
stdout:
- "{{ Image.Version }}"
{% for r_version in Dependencies.R -%}
"Ensure R version is correct":
exec: {{ r.get_version_directory(r_version) }}/bin/R --version
exit-status: 0
stdout:
- "{{ r_version }}"
skip: {% raw %}{{ if eq .Env.IMAGE_VARIANT "Minimal" }}true{{ else }}false{{ end }}{% endraw %}
{%- endfor %}
{% for python_version in Dependencies.python -%}
"Ensure Python version is correct":
exec: {{ python.get_version_directory(python_version) }}/bin/python --version
exit-status: 0
stdout:
- "{{ python_version }}"
skip: {% raw %}{{ if eq .Env.IMAGE_VARIANT "Minimal" }}true{{ else }}false{{ end }}{% endraw %}
{%- endfor %}