Skip to content

Commit

Permalink
Pickup OMS Agent version 1.9.0 0
Browse files Browse the repository at this point in the history
Pickup OMS Agent version 1.9.0 0
  • Loading branch information
HDYA committed May 24, 2019
2 parents 3944d66 + 04307f7 commit 74cc424
Show file tree
Hide file tree
Showing 11 changed files with 94 additions and 47 deletions.
4 changes: 4 additions & 0 deletions .final_builds/jobs/omsagent/index.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
builds:
74c08cc7427223fcb97e6952df75bbd6e95a00a8:
version: 74c08cc7427223fcb97e6952df75bbd6e95a00a8
blobstore_id: 90b84d0d-4d6e-416d-5d8f-ae2c39483e68
sha1: dc9d8e1b6643d94cc11fc0beb0fb3bfe1a2cb239
c2015c6bcb8b15450cd6c0e2c44ea5bb4370ef1b:
version: c2015c6bcb8b15450cd6c0e2c44ea5bb4370ef1b
blobstore_id: 39c55118-7e64-496e-61f7-f0f81debe957
Expand Down
4 changes: 4 additions & 0 deletions .final_builds/packages/omsagent/index.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
builds:
0399986a65232675693fd885ea1374b0f4a72720:
version: 0399986a65232675693fd885ea1374b0f4a72720
blobstore_id: cea62c12-a110-4152-437a-b0ef77883c4d
sha1: f34c7d9b659c913d56b5722b2cac026c34cc6b14
a834d1253b5cbe793dc3bf227f2377b4068d0a71:
version: a834d1253b5cbe793dc3bf227f2377b4068d0a71
blobstore_id: 205e8b10-58b3-4074-56f2-18afe4abfa6b
Expand Down
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ To use this bosh release, first upload it to your BOSH Director:

```
# BOSH CLI v1
bosh upload release https://github.com/Azure/oms-agent-for-linux-boshrelease/releases/download/v1.4.2-125/oms-agent-for-linux-1.4.2-125.tgz
bosh upload release https://github.com/Azure/oms-agent-for-linux-boshrelease/releases/download/v1.9.0-0/oms-agent-for-linux-1.9.0-0.tgz
# BOSH CLI v2
bosh2 upload-release https://github.com/Azure/oms-agent-for-linux-boshrelease/releases/download/v1.4.2-125/oms-agent-for-linux-1.4.2-125.tgz
bosh2 upload-release https://github.com/Azure/oms-agent-for-linux-boshrelease/releases/download/v1.9.0-0/oms-agent-for-linux-1.9.0-0.tgz
```

### 2. Deploy as a BOSH addon
Expand All @@ -35,7 +35,7 @@ First, create a new file `runtime.yml` and paste all the following content into
---
releases:
- name: oms-agent-for-linux
version: 1.4.2-125
version: 1.9.0-0
addons:
- name: omsagent
jobs:
Expand All @@ -44,6 +44,9 @@ addons:
exclude:
stemcell:
- os: windows2012R2
- os: windows2016
- os: windows2019
- os: windows1803
properties:
# Get the OMS workspace ID and key from OMS Portal
oms:
Expand Down
56 changes: 24 additions & 32 deletions config/blobs.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,24 @@
omsagent/omi-1.3.0-2.ulinux.x64.deb:
size: 1583696
object_id: 73487392-6024-4cff-64fc-f2d02b0c1bda
sha: 32001c76f294698b3b3829e69204e40cc256623e
omsagent/omi-1.3.0-2.ulinux.x64.rpm:
size: 1472173
object_id: b9c53f04-2a7e-40e5-7e55-858bba958f04
sha: aae2c03c73d456a464cc5e32a967ebe906deb141
omsagent/omsagent-1.4.2-125.universal.x64.deb:
size: 18663638
object_id: 37da078c-8fbb-401a-41de-24768a947b15
sha: eb56efe19e374d45fba82565924cc56b8141b6f5
omsagent/omsagent-1.4.2-125.universal.x64.rpm:
size: 19560522
object_id: 2ebc5e11-bc42-4045-6026-ddfff6d9f53b
sha: 28c89233d775d31e5799197f21205f4e5e5c5bdd
omsagent/omsconfig-1.1.1-563.x64.deb:
size: 1998468
object_id: 4ff94ff0-1539-4b9b-5996-18f8f35ab6b2
sha: 0629c90b6cb5906cfa1da9784469f35e57ff8513
omsagent/omsconfig-1.1.1-563.x64.rpm:
size: 2015410
object_id: 9f6e04a0-ce78-460d-655a-a37c737e0c8e
sha: e5dc583c899d1668de2f3a3f919cbec421028d8f
omsagent/scx-1.6.3-326.universal.x64.deb:
size: 2022684
object_id: f8abaeaf-de24-4724-459d-088f76f48026
sha: 27d795fddd455298b3304e20e49c4d55829a0ae8
omsagent/scx-1.6.3-326.universal.x64.rpm:
size: 1829054
object_id: f8e56906-abb7-4a37-4064-4e7059103e79
sha: e43563fc3510e27d2650355e884483b0d4cfe1db
omsagent/omi-1.6.0-0.ulinux.x64.deb:
size: 1841460
sha: 7aac5a77d2c443e9b8e4915a67c603ddbaa1b612
omsagent/omi-1.6.0-0.ulinux.x64.rpm:
size: 1909556
sha: 6bdd0aae8684914c91606876cd937f0d4c5882c9
omsagent/omsagent-1.9.0-0.universal.x64.deb:
size: 19425008
sha: d3f08a62ef6a3c9541cb4d9ca7ddf8ee2508e947
omsagent/omsagent-1.9.0-0.universal.x64.rpm:
size: 20355592
sha: c4df201cdeafa180a6e2006d71426e5aa77c7363
omsagent/omsconfig-1.1.1-918.x64.deb:
size: 3801634
sha: 9bcd814e325510afd71de327a2fa28223385dc93
omsagent/omsconfig-1.1.1-918.x64.rpm:
size: 3829206
sha: ad616b1b433b2fb1f28cc488fb8d2cc16ee03f25
omsagent/scx-1.6.3-659.universal.x64.deb:
size: 2043724
sha: 1b0deb843eb92c5e14f75362bb50a9a882d7a7fd
omsagent/scx-1.6.3-659.universal.x64.rpm:
size: 2078016
sha: 8729add0a4f58b3e261cbb12e3ed6cc4a93702b6
2 changes: 1 addition & 1 deletion config/final.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ blobstore:
provider: s3
options:
bucket_name: oms-agent-for-linux-boshrelease
final_name: oms-agent-for-linux
final_name: oms-agent-for-linux
15 changes: 13 additions & 2 deletions jobs/omsagent/templates/install.erb
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,24 @@ DPKG_FOUND=$?
# Stop existing agent
reg="omsagent-[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}"
sev=$(service --status-all | grep -P $reg -o)
ins=$(top -b -n 1 | grep omsagent)

if [ ! -z "$sev" ]; then
if [ ! -z "$sev" ] | [ ! -z "$ins" ]; then
echo "Existing oms agent found $sev"
netstat -anop | grep ${rsyslog_port} | cut -c 81- | cut -d'/' -f 1 | cut -d'-' -f 1 | xargs kill -s 9
sudo netstat -anop | grep ${rsyslog_port} | cut -c 81- | cut -d'/' -f 1 | cut -d'-' -f 1 | sudo xargs kill -s 9
service "$sev" stop
rm -f /etc/init.d/omsagent*

echo -n "Terminating existing oms agent.. "
current_pids=$(sudo netstat -anop | grep ${rsyslog_port} | cut -c 81- | cut -d'/' -f 1 | cut -d'-' -f 1)
for current_pid in $current_pids; do
echo -n "$curent_pid "
sudo kill -sigkill $current_pid
echo $curent_pid > $PID_FILE_TEMP
wait_until_process_stops $PID_FILE_TEMP 5
done
echo ""

if [ ${DPKG_FOUND} -eq 0 ]; then
dpkg -r omsagent omsconfig
else
Expand Down
9 changes: 9 additions & 0 deletions jobs/omsagent/templates/omsagent-ctl.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ RUN_DIR=/var/vcap/sys/run/omsagent
LOG_DIR=/var/vcap/sys/log/omsagent

PID_FILE=$RUN_DIR/omsagent.pid
PID_FILE_TEMP=$RUN_DIR/omsagent_tmp.pid
LOG_FILE=$LOG_DIR/omsagent.log

RUBY_BIN=/opt/microsoft/omsagent/ruby/bin/ruby
Expand All @@ -19,6 +20,7 @@ OMSAGENT_CONF=/etc/opt/microsoft/omsagent/${WORKSPACE_ID}/conf/omsagent.conf
case $1 in

start)
$0 stop

mkdir -p $RUN_DIR

Expand Down Expand Up @@ -77,6 +79,13 @@ case $1 in

kill -sigkill `cat $PID_FILE`
wait_until_process_stops $PID_FILE 5

current_pids=$(sudo netstat -anop | grep ${rsyslog_port} | cut -c 81- | cut -d'/' -f 1 | cut -d'-' -f 1)
for current_pid in $current_pids; do
sudo kill -sigkill $current_pid
echo $curent_pid > $PID_FILE_TEMP
wait_until_process_stops $PID_FILE_TEMP 5
done
;;

# dsc might call restart, to avoid conflict with monit, only stop the omsagent process, and leave monit to start it again
Expand Down
5 changes: 4 additions & 1 deletion manifests/example-runtime-config.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
releases:
- name: oms-agent-for-linux
version: 1.4.2-125
version: 1.9.0-0
url: https://github.com/Azure/oms-agent-for-linux-boshrelease/releases/download/v1.4.2-125/oms-agent-for-linux-1.4.2-125.tgz
addons:
- name: omsagent
Expand All @@ -10,6 +10,9 @@ addons:
exclude:
stemcell:
- os: windows2012R2
- os: windows2016
- os: windows2019
- os: windows1803
properties:
# Get the OMS workspace ID and key from OMS Portal
oms:
Expand Down
16 changes: 8 additions & 8 deletions packages/omsagent/spec
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ name: omsagent

files:
- utils/utils.sh
- omsagent/omi-1.3.0-2.ulinux.x64.deb
- omsagent/omsagent-1.4.2-125.universal.x64.deb
- omsagent/omsconfig-1.1.1-563.x64.deb
- omsagent/scx-1.6.3-326.universal.x64.deb
- omsagent/omi-1.3.0-2.ulinux.x64.rpm
- omsagent/omsagent-1.4.2-125.universal.x64.rpm
- omsagent/omsconfig-1.1.1-563.x64.rpm
- omsagent/scx-1.6.3-326.universal.x64.rpm
- omsagent/omi-1.6.0-0.ulinux.x64.deb
- omsagent/omsagent-1.9.0-0.universal.x64.deb
- omsagent/omsconfig-1.1.1-918.x64.deb
- omsagent/scx-1.6.3-659.universal.x64.deb
- omsagent/omi-1.6.0-0.ulinux.x64.rpm
- omsagent/omsagent-1.9.0-0.universal.x64.rpm
- omsagent/omsconfig-1.1.1-918.x64.rpm
- omsagent/scx-1.6.3-659.universal.x64.rpm
- conf/logrotate.scx.conf
- conf/oms.uaa.conf

2 changes: 2 additions & 0 deletions releases/oms-agent-for-linux/index.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
builds:
5d37573c-6aa0-4e9d-483d-c36b1f0d37f1:
version: 1.9.0-0
600837c5-972b-4c82-85ca-d54073f20aa3:
version: "1"
870d9710-5fa3-470a-4e3f-e13adf1ed96e:
Expand Down
19 changes: 19 additions & 0 deletions releases/oms-agent-for-linux/oms-agent-for-linux-1.9.0-0.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: oms-agent-for-linux
version: 1.9.0-0
commit_hash: 9dfadc2
uncommitted_changes: false
jobs:
- name: omsagent
version: 74c08cc7427223fcb97e6952df75bbd6e95a00a8
fingerprint: 74c08cc7427223fcb97e6952df75bbd6e95a00a8
sha1: dc9d8e1b6643d94cc11fc0beb0fb3bfe1a2cb239
packages:
- name: omsagent
version: 0399986a65232675693fd885ea1374b0f4a72720
fingerprint: 0399986a65232675693fd885ea1374b0f4a72720
sha1: f34c7d9b659c913d56b5722b2cac026c34cc6b14
dependencies: []
license:
version: e6c4ccc65c76e75e2338d1edabdcf264d37ee663
fingerprint: e6c4ccc65c76e75e2338d1edabdcf264d37ee663
sha1: 039ff715624729edd9f8d54ab97dd71fb9ef2eea

0 comments on commit 74cc424

Please sign in to comment.