Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
GC Infrastructure code
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
OSDU Software
OSDU Data Platform
Deployment and Operations
GC Infrastructure code
Merge requests
!286
GONRG-4491: Add elastic config to df
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
GONRG-4491: Add elastic config to df
GONRG-4491-add-elastic-config-to-DF
into
master
Overview
0
Commits
10
Pipelines
8
Changes
3
Merged
Nastassia Rabeichykava (EPAM)
requested to merge
GONRG-4491-add-elastic-config-to-DF
into
master
2 years ago
Overview
0
Commits
10
Pipelines
8
Changes
3
Expand
0
0
Merge request reports
Compare
master
version 7
7f01b24b
2 years ago
version 6
62edb89c
2 years ago
version 5
5f2db200
2 years ago
version 4
3d92ece6
2 years ago
version 3
e2ea2575
2 years ago
version 2
dc0b0f92
2 years ago
version 1
690e9d35
2 years ago
master (base)
and
latest version
latest version
32adec70
10 commits,
2 years ago
version 7
7f01b24b
9 commits,
2 years ago
version 6
62edb89c
8 commits,
2 years ago
version 5
5f2db200
7 commits,
2 years ago
version 4
3d92ece6
6 commits,
2 years ago
version 3
e2ea2575
5 commits,
2 years ago
version 2
dc0b0f92
4 commits,
2 years ago
version 1
690e9d35
3 commits,
2 years ago
3 files
+
43
−
1
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
3
Search (e.g. *.vue) (Ctrl+P)
bootstrap_partition/bootstrap_partition.sh
+
31
−
1
Options
@@ -3,6 +3,7 @@
set
-ex
IDENTITY_TOKEN
=
`
gcloud auth print-identity-token
--audiences
=
${
AUDIENCES
}
`
DATA_PARTITION_ID_UPPER
=
${
DATA_PARTITION_ID
^^
}
generate_post_data
()
{
@@ -40,6 +41,22 @@ generate_post_data()
"crmAccountID": {
"sensitive": false,
"value": "[
${
DATA_PARTITION_ID
}
,
${
DATA_PARTITION_ID
}
]"
},
"elasticsearch.host": {
"sensitive": false,
"value": "
${
ELASTIC_HOST
}
"
},
"elasticsearch.port": {
"sensitive": false,
"value": "
${
ELASTIC_PORT
}
"
},
"elasticsearch.user": {
"sensitive": true,
"value": "ELASTIC_USER_
${
DATA_PARTITION_ID_UPPER
}
"
},
"elasticsearch.password": {
"sensitive": true,
"value": "ELASTIC_PASS_
${
DATA_PARTITION_ID_UPPER
}
"
}
}
}
@@ -55,4 +72,17 @@ status_code=$(curl -X POST \
-H
"Content-Type: application/json"
\
--data-raw
"
$(
generate_post_data
)
"
)
if
[
"
$status_code
"
==
201
-o
"
$status_code
"
==
409
]
;
then
echo
partition bootstrap was OK!
;
else
exit
1
;
fi
if
[
"
$status_code
"
==
201
]
then
echo
"partition bootstrap was OK!"
elif
[
"
$status_code
"
==
409
]
then
curl
-X
PATCH
\
--url
"http://
${
PARTITION_NAME
}
/api/partition/v1/partitions/
${
DATA_PARTITION_ID
}
"
--write-out
"%{http_code}"
--silent
--output
"/dev/null"
\
-H
"Authorization: Bearer
${
IDENTITY_TOKEN
}
"
\
-H
"Content-Type: application/json"
\
--data-raw
"
$(
generate_post_data
)
"
echo
"partition was patched because datastore has already had some entities!"
else
exit
1
fi
Loading