Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
reference-repository
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
grid5000
reference-repository
Commits
ec3299d3
Commit
ec3299d3
authored
4 years ago
by
Simon Delamare
Browse files
Options
Downloads
Patches
Plain Diff
[lib] kwollect generator: Clean existing files before generating new ones
parent
4767d36f
No related branches found
No related tags found
No related merge requests found
Pipeline
#172013
passed
4 years ago
Stage: validate
Stage: generate
Stage: deploy
Stage: .post
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/refrepo/gen/puppet/kwollectg5k.rb
+6
-0
6 additions, 0 deletions
lib/refrepo/gen/puppet/kwollectg5k.rb
with
6 additions
and
0 deletions
lib/refrepo/gen/puppet/kwollectg5k.rb
+
6
−
0
View file @
ec3299d3
...
...
@@ -19,10 +19,16 @@ def generate_puppet_kwollectg5k(options)
refapi
=
load_data_hierarchy
puts
"Old configurations directory will be stored in /tmp/kwollect-
#{
Time
.
now
.
to_i
}
"
backup_dir
=
Pathname
(
"/tmp/kwollect-
#{
Time
.
now
.
to_i
}
/"
)
backup_dir
.
mkpath
()
refapi
[
'sites'
].
each
{
|
site_uid
,
site
|
next
unless
options
[
:sites
].
include?
(
site_uid
)
FileUtils
.
mv
(
"
#{
options
[
:output_dir
]
}
//platforms/production/modules/generated/files/grid5000/kwollect/
#{
site_uid
}
"
,
"
#{
backup_dir
}
/"
)
# Metrics configuration for each node
site
[
'clusters'
].
sort
.
each
{
|
cluster_uid
,
cluster
|
cluster
[
'nodes'
].
each_sort_by_node_uid
{
|
node_uid
,
node
|
...
...
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