Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
flame-clmc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
flame
flame-clmc
Commits
9183617e
Commit
9183617e
authored
6 years ago
by
MJB
Browse files
Options
Downloads
Patches
Plain Diff
fixing fixtures so that it is consitent with openstack deployment
parent
a1ca634c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scripts/test/fixture.sh
+10
-9
10 additions, 9 deletions
scripts/test/fixture.sh
with
10 additions
and
9 deletions
scripts/test/fixture.sh
+
10
−
9
View file @
9183617e
#!/bin/bash
repo_root
=
"/vagrant"
target_root
=
"/opt/clmc"
config_file
=
"rspec.json"
usage
()
{
...
...
@@ -31,7 +32,7 @@ create() {
# copy flame clmc files into the root container
echo
"Copying files to rootfs"
container_dir
=
"/var/lib/lxd/containers/"
${
service_name
}
"/rootfs"
container_repo_root
=
${
container_dir
}
"/opt/clmc"
container_repo_root
=
${
container_dir
}
${
target_root
}
mkdir
-p
${
container_repo_root
}
cp
-f
${
repo_root
}
/reporc
${
container_repo_root
}
cp
-rf
${
repo_root
}
/scripts
${
container_repo_root
}
...
...
@@ -50,9 +51,9 @@ create() {
# provision software into each container
echo
"Provisioning:
${
service_name
}
"
if
[
${
service_name
}
==
"clmc-service"
]
;
then
cmd
=
"
/opt
/clmc/scripts/clmc-service/install.sh"
cmd
=
"
${
target_root
}
/clmc/scripts/clmc-service/install.sh"
echo
"Provisioning command
${
cmd
}
"
lxc
exec
${
service_name
}
--env
REPO_ROOT
=
"/opt/clmc"
--env
SFEMC_FQDN
=
"sfemc.localhost"
--
${
cmd
}
lxc
exec
${
service_name
}
--env
REPO_ROOT
=
${
target_root
}
--env
SFEMC_FQDN
=
"sfemc.localhost"
--
${
cmd
}
exit_code
=
$?
if
[
$exit_code
!=
0
]
;
then
echo
"clmc-service installation failed with exit code
${
exit_code
}
"
...
...
@@ -60,7 +61,7 @@ create() {
fi
elif
[
${
service_name
}
==
"test-runner"
]
then
cmd
=
/vagrant
/src/test/clmctest/services/pytest/install.sh
cmd
=
"
${
target_root
}
/src/test/clmctest/services/pytest/install.sh
"
lxc
exec
${
service_name
}
--
${
cmd
}
exit_code
=
$?
if
[
$exit_code
!=
0
]
;
then
...
...
@@ -78,16 +79,16 @@ create() {
influxdb_url
=
$(
echo
$SERVICE
| jq
-r
'.influxdb_url'
)
# install service function specific software
cmd
=
/vagrant
/src/test/clmctest/services/
${
sf_package_id
}
/install.sh
lxc
exec
${
service_name
}
--env
REPO_ROOT
=
"
/vagrant
"
--
${
cmd
}
cmd
=
"
${
target_root
}
/src/test/clmctest/services/
${
sf_package_id
}
/install.sh
"
lxc
exec
${
service_name
}
--env
REPO_ROOT
=
"
${
target_root
}
"
--
${
cmd
}
exit_code
=
$?
if
[
$exit_code
!=
0
]
;
then
echo
"
${
sf_package_id
}
installation failed with exit code
${
exit_code
}
"
exit
1
fi
# install telegraf
cmd
=
/vagrant
/scripts/clmc-agent/install.sh
lxc
exec
${
service_name
}
--env
REPO_ROOT
=
"
/vagrant"
--
/vagrant/scripts/clmc-agent/install.sh
cmd
=
"
${
target_root
}
/scripts/clmc-agent/install.sh
"
lxc
exec
${
service_name
}
--env
REPO_ROOT
=
"
${
target_root
}
"
--
${
cmd
}
# check that telegraf installed (it may not have if the reporc file was not present or Nexus server was down)
if
lxc-attach
-n
${
service_name
}
--
ls
/etc/telegraf |&
grep
'ls: cannot access'
;
then
...
...
@@ -108,7 +109,7 @@ create() {
chown
-R
100000:100000
${
container_dir
}
/etc/telegraf/
# replace telegraf template with container parameters
cmd
=
"
/vagrant
/scripts/clmc-agent/configure.sh
${
location
}
${
sfc_id
}
${
sfc_instance_id
}
${
sf_package_id
}
${
sf_id
}
${
sf_endpoint_id
}
${
influxdb_url
}
"
cmd
=
"
${
target_root
}
/scripts/clmc-agent/configure.sh
${
location
}
${
sfc_id
}
${
sfc_instance_id
}
${
sf_package_id
}
${
sf_id
}
${
sf_endpoint_id
}
${
influxdb_url
}
"
lxc
exec
${
service_name
}
--
${
cmd
}
# start telegraf
...
...
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