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
6859ba91
Commit
6859ba91
authored
5 years ago
by
madavi
Committed by
Gerrit Code Review
5 years ago
Browse files
Options
Downloads
Plain Diff
Merge "Native charm support"
parents
e64b95dd
5ddc97f9
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
+1
-0
1 addition, 0 deletions
installers/docker/__lcm__.env
installers/full_install_osm.sh
+24
-1
24 additions, 1 deletion
installers/full_install_osm.sh
with
25 additions
and
1 deletion
installers/docker/__lcm__.env
+
1
−
0
View file @
6859ba91
...
...
@@ -14,3 +14,4 @@
OSMLCM_VCA_HOST=__JUJU_CONTROLLER_IP__
OSMLCM_VCA_SECRET=__JUJU_PASSWORD__
OSMLCM_VCA_PUBKEY=__JUJU_PUBKEY__
OSMLCM_VCA_APIPROXY=__JUJU_APIPROXY__
This diff is collapsed.
Click to expand it.
installers/full_install_osm.sh
+
24
−
1
View file @
6859ba91
...
...
@@ -31,6 +31,7 @@ function usage(){
echo
-e
" -S <VCA secret> use VCA/juju secret key"
echo
-e
" -P <VCA pubkey> use VCA/juju public key file"
echo
-e
" -C <VCA cacert> use VCA/juju CA certificate file"
echo
-e
" -A <VCA apiproxy> use VCA/juju API proxy"
echo
-e
" --vimemu: additionally deploy the VIM emulator as a docker container"
echo
-e
" --elk_stack: additionally deploy an ELK docker stack for event logging"
echo
-e
" --pm_stack: additionally deploy a Prometheus+Grafana stack for performance monitoring (PM)"
...
...
@@ -644,6 +645,13 @@ function juju_createcontroller() {
[
$(
juju controllers |
awk
"/^
${
OSM_STACK_NAME
}
[
\*
| ]/{print
$1
}"
|wc
-l
)
-eq
1
]
||
FATAL
"Juju installation failed"
}
function
juju_createproxy
()
{
if
!
sudo
iptables
-t
nat
-C
PREROUTING
-p
tcp
-m
tcp
--dport
17070
-j
DNAT
--to-destination
$OSM_VCA_HOST
;
then
sudo
iptables
-t
nat
-A
PREROUTING
-p
tcp
-m
tcp
--dport
17070
-j
DNAT
--to-destination
$OSM_VCA_HOST
sudo
netfilter-persistent save
fi
}
function
generate_docker_images
()
{
echo
"Pulling and generating docker images"
_build_from
=
$COMMIT_ID
...
...
@@ -796,6 +804,12 @@ function generate_docker_env_files() {
# $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_APIPROXY"
$OSM_DOCKER_WORK_DIR
/lcm.env
;
then
echo
"OSMLCM_VCA_APIPROXY=
${
OSM_VCA_APIPROXY
}
"
|
$WORKDIR_SUDO
tee
-a
$OSM_DOCKER_WORK_DIR
/lcm.env
else
$WORKDIR_SUDO
sed
-i
"s|OSMLCM_VCA_APIPROXY.*|OSMLCM_VCA_APIPROXY=
${
OSM_VCA_APIPROXY
}
|g"
$OSM_DOCKER_WORK_DIR
/lcm.env
fi
# RO
MYSQL_ROOT_PASSWORD
=
$(
generate_secret
)
if
[
!
-f
$OSM_DOCKER_WORK_DIR
/ro-db.env
]
;
then
...
...
@@ -1046,6 +1060,12 @@ function install_lightweight() {
#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_APIPROXY
"
]
;
then
OSM_VCA_APIPROXY
=
$DEFAULT_IP
[
-z
"
$OSM_VCA_APIPROXY
"
]
&&
FATAL
"Cannot obtain juju api proxy"
fi
juju_createproxy
if
[
-z
"
$OSM_DATABASE_COMMONKEY
"
]
;
then
OSM_DATABASE_COMMONKEY
=
$(
generate_secret
)
[
-z
"OSM_DATABASE_COMMONKEY"
]
&&
FATAL
"Cannot generate common db secret"
...
...
@@ -1215,7 +1235,7 @@ OSM_DATABASE_COMMONKEY=
ELASTIC_VERSION
=
6.4.2
ELASTIC_CURATOR_VERSION
=
5.5.4
while
getopts
":hy-:b:r:k:u:R:l:p:D:o:m:H:S:s:w:t:U:P:"
o
;
do
while
getopts
":hy-:b:r:k:u:R:l:p:D:o:m:H:S:s:w:t:U:P:
A:
"
o
;
do
case
"
${
o
}
"
in
h
)
usage
&&
exit
0
...
...
@@ -1264,6 +1284,9 @@ while getopts ":hy-:b:r:k:u:R:l:p:D:o:m:H:S:s:w:t:U:P:" o; do
P
)
OSM_VCA_PUBKEY
=
$(
cat
${
OPTARG
}
)
;;
A
)
OSM_VCA_APIPROXY
=
"
${
OPTARG
}
"
;;
w
)
# when specifying workdir, do not use sudo for access
WORKDIR_SUDO
=
...
...
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