Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
devops
Manage
Activity
Members
Labels
Plan
Issues
4
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
1
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
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
osm
devops
Commits
5311973b
Commit
5311973b
authored
5 years ago
by
madavi
Committed by
Gerrit Code Review
5 years ago
Browse files
Options
Downloads
Plain Diff
Merge "Remove OSMLCM_VCA_CACERT"
parents
d3dd3436
5a50a063
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
installers/docker/__lcm__.env
+13
-1
13 additions, 1 deletion
installers/docker/__lcm__.env
installers/full_install_osm.sh
+9
-9
9 additions, 9 deletions
installers/full_install_osm.sh
with
22 additions
and
10 deletions
installers/docker/__lcm__.env
+
13
−
1
View file @
5311973b
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
OSMLCM_VCA_HOST=__JUJU_CONTROLLER_IP__
OSMLCM_VCA_SECRET=__JUJU_PASSWORD__
OSMLCM_VCA_PUBKEY=__JUJU_PUBKEY__
OSMLCM_VCA_CACERT=__JUJU_CACERT__
This diff is collapsed.
Click to expand it.
installers/full_install_osm.sh
+
9
−
9
View file @
5311973b
...
...
@@ -779,11 +779,11 @@ function generate_docker_env_files() {
$WORKDIR_SUDO
sed
-i
"s|OSMLCM_VCA_PUBKEY.*|OSMLCM_VCA_PUBKEY=
\"
${
OSM_VCA_PUBKEY
}
\"
|g"
$OSM_DOCKER_WORK_DIR
/lcm.env
fi
if
!
grep
-Fq
"OSMLCM_VCA_CACERT"
$OSM_DOCKER_WORK_DIR
/lcm.env
;
then
echo
"OSMLCM_VCA_CACERT=
\"
${
OSM_VCA_CACERT
}
\"
"
|
$WORKDIR_SUDO
tee
-a
$OSM_DOCKER_WORK_DIR
/lcm.env
else
$WORKDIR_SUDO
sed
-i
"s|OSMLCM_VCA_CACERT.*|OSMLCM_VCA_CACERT=
\"
${
OSM_VCA_CACERT
}
\"
|g"
$OSM_DOCKER_WORK_DIR
/lcm.env
fi
#
if ! grep -Fq "OSMLCM_VCA_CACERT" $OSM_DOCKER_WORK_DIR/lcm.env; then
#
echo "OSMLCM_VCA_CACERT=\"${OSM_VCA_CACERT}\"" | $WORKDIR_SUDO tee -a $OSM_DOCKER_WORK_DIR/lcm.env
#
else
#
$WORKDIR_SUDO sed -i "s|OSMLCM_VCA_CACERT.*|OSMLCM_VCA_CACERT=\"${OSM_VCA_CACERT}\"|g" $OSM_DOCKER_WORK_DIR/lcm.env
#
fi
# RO
MYSQL_ROOT_PASSWORD
=
$(
generate_secret
)
...
...
@@ -1031,10 +1031,10 @@ function install_lightweight() {
OSM_VCA_PUBKEY
=
$(
cat
$HOME
/.local/share/juju/ssh/juju_id_rsa.pub
)
[
-z
"
$OSM_VCA_PUBKEY
"
]
&&
FATAL
"Cannot obtain juju public key"
fi
if
[
-z
"
$OSM_VCA_CACERT
"
]
;
then
OSM_VCA_CACERT
=
$(
juju controllers
--format
json | jq
-r
'.controllers["osm"]["ca-cert"]'
|
grep
-v
"
\-\-\-\-\-
.*CERTIFICATE
\-\-\-\-\-
"
)
[
-z
"
$OSM_VCA_CACERT
"
]
&&
FATAL
"Cannot obtain juju CA certificate"
fi
#
if [ -z "$OSM_VCA_CACERT" ]; then
#
OSM_VCA_CACERT=$(juju controllers --format json | jq -r '.controllers["osm"]["ca-cert"]' | grep -v "\-\-\-\-\-.*CERTIFICATE\-\-\-\-\-")
#
[ -z "$OSM_VCA_CACERT" ] && FATAL "Cannot obtain juju CA certificate"
#
fi
if
[
-z
"
$OSM_DATABASE_COMMONKEY
"
]
;
then
OSM_DATABASE_COMMONKEY
=
$(
generate_secret
)
[
-z
"OSM_DATABASE_COMMONKEY"
]
&&
FATAL
"Cannot generate common db secret"
...
...
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