Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
scaleway instances template
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
systemes-dinformation
alpha
pocs
Cloud Machinist
cloud machinist templates
scaleway instances template
Commits
7dcf7710
Commit
7dcf7710
authored
5 months ago
by
Nathan Rodet
Browse files
Options
Downloads
Patches
Plain Diff
fix: added condition to bash script, to add the case of unique instance deployment
parent
c42654a4
Branches
main
No related tags found
No related merge requests found
Pipeline
#108802
failed
5 months ago
Stage: prepare
Stage: validate
Stage: build
Stage: deploy
Stage: destroy
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
instance-scripts/config-files/atrium.yaml
+2
-2
2 additions, 2 deletions
instance-scripts/config-files/atrium.yaml
instance-scripts/scripts/atrium.sh
+12
-1
12 additions, 1 deletion
instance-scripts/scripts/atrium.sh
with
14 additions
and
3 deletions
instance-scripts/config-files/atrium.yaml
+
2
−
2
View file @
7dcf7710
...
...
@@ -9,7 +9,7 @@ apps: # optional : applications served by atrium
icon
:
terminal
color
:
4292030255
is_proxy
:
true
host
:
terminal
-
%atrium_count_index%
host
:
terminal%
-
atrium_count_index%
target
:
localhost:8081
secured
:
true
login
:
admin
...
...
@@ -20,4 +20,4 @@ users:
-
login
:
admin
password
:
%
user_password_hash%
roles
:
-
ADMINS
\ No newline at end of file
-
ADMINS
This diff is collapsed.
Click to expand it.
instance-scripts/scripts/atrium.sh
+
12
−
1
View file @
7dcf7710
...
...
@@ -5,6 +5,7 @@
#
export
USER_PASSWORD_HASH
=
$(
echo
-n
"
$(
scw-userdata user_password
)
"
| argon2
"
$(
echo
$RANDOM
|
md5sum
|
head
-c
12
)
"
-id
-l
32
-e
)
export
ATRIUM_COUNT_INDEX
=
$(
scw-userdata atrium_count_index
)
mkdir
-p
/root/atrium/data
&&
mkdir
-p
/root/atrium/letsencrypt_cache
curl https://forge.grandlyon.com/systemes-dinformation/alpha/pocs/cloud-machinist/cloud-machinist-templates/scaleway-instances-template/-/raw/main/instance-scripts/config-files/atrium.yaml
-o
root/atrium/atrium.yaml
...
...
@@ -12,7 +13,14 @@ curl https://forge.grandlyon.com/systemes-dinformation/alpha/pocs/cloud-machinis
sed
-i
"s|%atrium_hostname%|
$(
scw-userdata atrium_hostname
)
|g"
/root/atrium/atrium.yaml
sed
-i
"s|%project_domain%|
$(
scw-userdata project_domain
)
|g"
/root/atrium/atrium.yaml
sed
-i
"s|%atrium_letsencrypt_email%|
$(
scw-userdata atrium_letsencrypt_email
)
|g"
/root/atrium/atrium.yaml
sed
-i
"s|%atrium_count_index%|
$(
scw-userdata atrium_count_index
)
|g"
/root/atrium/atrium.yaml
if
[
"
$ATRIUM_COUNT_INDEX
"
-eq
0
]
;
then
sed
-i
"s|%-atrium_count_index%||g"
/root/atrium/atrium.yaml
echo
"test1"
else
# Apply this if the value is greater than 0
sed
-i
"s|%-atrium_count_index%|-
$(
scw-userdata atrium_count_index
)
|g"
/root/atrium/atrium.yaml
echo
"test2"
fi
sed
-i
"s|%user_password_hash%|
$USER_PASSWORD_HASH
|g"
/root/atrium/atrium.yaml
sed
-i
"s|%user_password%|
$(
scw-userdata user_password
)
|g"
/root/atrium/atrium.yaml
chown
-Rf
1000:1000 /root/atrium
...
...
@@ -29,3 +37,6 @@ docker run -d --name atrium \
-v
/root/atrium/data:/app/data nicolaspernoud/atrium:latest
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment