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
afad8cdd
Commit
afad8cdd
authored
6 years ago
by
MJB
Browse files
Options
Downloads
Patches
Plain Diff
.gitignore
parent
39007e26
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Vagrantfile
+2
-1
2 additions, 1 deletion
Vagrantfile
scripts/clmc-agent/build-telegraf.sh
+10
-8
10 additions, 8 deletions
scripts/clmc-agent/build-telegraf.sh
scripts/clmc-agent/install.sh
+22
-7
22 additions, 7 deletions
scripts/clmc-agent/install.sh
with
34 additions
and
16 deletions
Vagrantfile
+
2
−
1
View file @
afad8cdd
...
...
@@ -97,7 +97,8 @@ Vagrant.configure("2") do |config|
instance_config
.
vm
.
provision
:shell
,
:path
=>
"clmctest/services/
#{
host
[
"service_name"
]
}
/install.sh"
,
env:
{
"REPO_ROOT"
=>
"/vagrant"
}
# CLMC agent install
instance_config
.
vm
.
provision
:shell
,
:path
=>
"scripts/clmc-agent/install.sh"
instance_config
.
vm
.
provision
"file"
,
source:
"reporc"
,
destination:
"/vagrant/reporc"
instance_config
.
vm
.
provision
:shell
,
:path
=>
"scripts/clmc-agent/install.sh"
,
env:
{
"REPO_ROOT"
=>
"/vagrant"
}
# CLMC agent service specific input configuration
instance_config
.
vm
.
provision
:shell
,
inline:
<<-
SHELL
...
...
This diff is collapsed.
Click to expand it.
scripts/clmc-agent/build-telegraf.sh
+
10
−
8
View file @
afad8cdd
#!/bin/bash
# install build prequisites
sudo
apt-get
install
ruby ruby-dev rubygems build-essential rpm
-y
sudo
gem
install
--no-ri
--no-rdoc
fpm
apt-get
install
ruby ruby-dev rubygems build-essential rpm
-y
gem
install
--no-ri
--no-rdoc
fpm
# install go
wget https://dl.google.com/go/go1.10.2.linux-amd64.tar.gz
wget https://dl.google.com/go/go1.10.2.linux-amd64.tar.gz
-O
go1.10.2.linux-amd64.tar.gz
tar
-C
/usr/local
-xzf
go1.10.2.linux-amd64.tar.gz
GORC
=
~/gorc
GOPATH
=
~/go
# set the environment variables
echo
'PATH=$PATH:/usr/local/go/bin'
>
/tmp/gorc
echo
'GOPATH=
/tmp/go'
>>
/tmp/gorc
source
/tmp/gorc
echo
'PATH=$PATH:/usr/local/go/bin'
>
${
GORC
}
echo
'GOPATH=
${GOPATH}'
>>
${
GORC
}
source
${
GORC
}
mkdir
$GOPATH
...
...
@@ -25,11 +27,11 @@ git remote add it-innovation https://github.com/it-innovation/telegraf.git
git pull
--rebase
it-innovation master
# build telegraf
chmod
755 ./scripts/
*
.sh
make
# build the packages
make package
# chmod 755 ./scripts/*.sh
# make package
# git push it-innovation
...
...
This diff is collapsed.
Click to expand it.
scripts/clmc-agent/install.sh
+
22
−
7
View file @
afad8cdd
...
...
@@ -29,15 +29,30 @@ set -euo pipefail
echo
"Installing Telegraf agent"
TELEGRAF_VERSION
=
1.
6.2-1
TELEGRAF_VERSION
=
1.
7.0~5618bb0-0
TELEGRAF_CHECKSUM
=
dc24932fa1aef9392582880c077dd2493b9f2c66babd7733a0654540bbb5003b
# Install telegraf
wget https://dl.influxdata.com/telegraf/releases/telegraf_
${
TELEGRAF_VERSION
}
_amd64.deb 2> /dev/null
sha256sum
telegraf_
${
TELEGRAF_VERSION
}
_amd64.deb |
grep
$TELEGRAF_CHECKSUM
>
/dev/null
if
[
$?
==
1
]
;
then
echo
"Telegraf download failed checksum"
exit
1
## wget https://dl.influxdata.com/telegraf/releases/telegraf_${TELEGRAF_VERSION}_amd64.deb 2> /dev/null
# load the runtime configuration for the artefact repository
if
[
!
-f
${
REPO_ROOT
}
/reporc
]
;
then
echo
"Cannot download FLIPS binaries as reporc file containing artefact repository credentials does not exist within user's home folder"
exit
1
fi
dpkg
-i
telegraf_
${
TELEGRAF_VERSION
}
_amd64.deb
source
${
REPO_ROOT
}
/reporc
echo
"Setting the envrionemtn variables"
echo
"USER:
${
REPO_USER
}
"
echo
"PASS:
${
REPO_PASS
}
"
wget
--user
${
REPO_USER
}
--password
${
REPO_PASS
}
https://flame-nexus.it-innovation.soton.ac.uk/repository/flame-general/it-innovation/telegraf/
${
TELEGRAF_VERSION
}
/telegraf-
${
TELEGRAF_VERSION
}
.deb
-O
telegraf-
${
TELEGRAF_VERSION
}
.deb
#sha256sum telegraf_${TELEGRAF_VERSION}_amd64.deb | grep $TELEGRAF_CHECKSUM > /dev/null
#if [ $? == 1 ]; then
# echo "Telegraf download failed checksum"
# exit 1
#fi
dpkg
-i
telegraf-
${
TELEGRAF_VERSION
}
.deb
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