* ACS Docs (#15)

* new ff branch

* hot fix added 17

* fix on container.conf

* Using the get_hostname for hostname instead of the host field in syslog filter

* Adding yaml file for Kubernetes

* converting to unix line endings

* converting to unix line endings
This commit is contained in:
Keiko Harada 2017-03-31 15:15:50 -07:00 коммит произвёл GitHub
Родитель f82f23a350
Коммит e05bc15e9f
8 изменённых файлов: 82 добавлений и 7 удалений

Просмотреть файл

@ -1,6 +1,7 @@
TMPDIR="/opt"
cd $TMPDIR
wget https://atlantapublicint2.blob.core.windows.net:443/resources/omsagent-1.2.2-148.universal.x64.sh
sed -i "s/^exit 101$/exit 0/" /usr/sbin/policy-rc.d
chmod 775 $TMPDIR/*.sh
$TMPDIR/omsagent-1.2.2-148.universal.x64.sh --extract
mv $TMPDIR/omsbundle* $TMPDIR/omsbundle

11
1.3.2-15/Dockerfile Normal file
Просмотреть файл

@ -0,0 +1,11 @@
FROM ubuntu:16.04
MAINTAINER OMSContainers@microsoft.com
LABEL vendor=Microsoft\ Corp \
com.microsoft.product="OMS Container Docker Provider" \
com.microsoft.version="1.0.0-22"
ENV tmpdir /opt
RUN /usr/bin/apt-get update && /usr/bin/apt-get install -y libc-bin wget openssl curl sudo python-ctypes sysv-rc cron net-tools rsyslog && rm -rf /var/lib/apt/lists/*
COPY setup.sh main.sh $tmpdir/
WORKDIR ${tmpdir}
RUN chmod 775 $tmpdir/*.sh; sync; $tmpdir/setup.sh
CMD [ "/opt/main.sh" ]

34
1.3.2-15/main.sh Normal file
Просмотреть файл

@ -0,0 +1,34 @@
#!/bin/bash -x
sed -i -e 's/bind 127.0.0.1/bind 0.0.0.0/g' /etc/opt/microsoft/omsagent/sysconf/omsagent.d/container.conf
sed -i -e 's/^exit 101$/exit 0/g' /usr/sbin/policy-rc.d
#Using the get_hostname for hostname instead of the host field in syslog messages
sed -i.bak "s/record\[\"Host\"\] = hostname/record\[\"Host\"\] = OMS::Common.get_hostname/" /opt/microsoft/omsagent/plugin/filter_syslog.rb
#service omid start
/opt/omi/bin/service_control start
if [ -z $INT ]; then
/opt/microsoft/omsagent/bin/omsadmin.sh -w $WSID -s $KEY
else
echo WORKSPACE_ID=$WSID > /etc/omsagent-onboard.conf
echo SHARED_KEY=$KEY >> /etc/omsagent-onboard.conf
/opt/microsoft/omsagent/bin/omsadmin.sh
fi
#service omsagent start
/opt/microsoft/omsagent/bin/service_control start
#/opt/microsoft/omsconfig/Scripts/OMS_MetaConfigHelper.py --disable
#rm -f /etc/opt/microsoft/omsagent/conf/omsagent.d/omsconfig.consistencyinvoker.conf
shutdown() {
/opt/omi/bin/service_control stop
/opt/microsoft/omsagent/bin/service_control stop
}
trap "shutdown" SIGTERM
sleep inf & wait

15
1.3.2-15/setup.sh Normal file
Просмотреть файл

@ -0,0 +1,15 @@
TMPDIR="/opt"
cd $TMPDIR
wget https://github.com/Microsoft/OMS-Agent-for-Linux/releases/download/OMSAgent-201703-v1.3.2-15/omsagent-1.3.2-15.universal.x64.sh
chmod 775 $TMPDIR/*.sh
$TMPDIR/omsagent-1.3.2-*.universal.x64.sh --extract
mv $TMPDIR/omsbundle* $TMPDIR/omsbundle
/usr/bin/dpkg -i $TMPDIR/omsbundle/100/omi*.deb
/usr/bin/dpkg -i $TMPDIR/omsbundle/100/scx*.deb
/usr/bin/dpkg -i $TMPDIR/omsbundle/100/omsagent*.deb
/usr/bin/dpkg -i $TMPDIR/omsbundle/100/omsconfig*.deb
/$TMPDIR/omsbundle/oss-kits/docker-cimprov-1.0.0-*.x86_64.sh --install
rm -rf $TMPDIR/omsbundle
rm -f $TMPDIR/omsagent*.sh
rm -f $TMPDIR/docker*.sh
rm -f $TMPDIR/*.deb

7
Contribution.md Normal file
Просмотреть файл

@ -0,0 +1,7 @@
# Contributing
Contributions of code (pull requests) to this repository are not being accepted at this time.
Your patience and interest are sincerely appreciated as we prepare this project to accept public
contributions.
In the meantime, we ask that you create an **Issue** for any problems you have found or feature requests.

Просмотреть файл

@ -7,8 +7,8 @@ spec:
metadata:
labels:
app: omsagent
agentVersion: 1.3.1-15
dockerProviderVersion: 10.0.0-19
agentVersion: 1.3.2-15
dockerProviderVersion: 10.0.0-22
spec:
containers:
- name: omsagent

Просмотреть файл

@ -9,6 +9,7 @@ This is a public preview product.
### Supported Linux Operating Systems, Docker, and ACS Mesosphere DC/OS:
- Docker 1.11 thru 1.13
- Docker CE and EE v17.03
- An x64 version of Linux OS
- Ubuntu 14.04 LTS, 16.04 LTS
@ -20,7 +21,8 @@ This is a public preview product.
- SLES 12
- RHEL 7.2, 7.3
- ACS Mesosphere DC/OS 1.7.3, 1.8.4
- ACS Mesosphere DC/OS 1.7.3, 1.8.8
- ACS Kubernetes 1.4.5
### Release Note
Update Information are [here.](https://github.com/Microsoft/OMS-docker/blob/master/ReleaseNote.md)
@ -28,7 +30,9 @@ Update Information are [here.](https://github.com/Microsoft/OMS-docker/blob/mast
## Setting up
As a pre-requisite, docker must be running prior to this installation. If you have installed before running docker, please re-install OMS Agent. For more information about docker, please go to https://www.docker.com/.
This set up is not for ACS Mesosphere DC/OS. For more information on Mesosphere DC/OS, please see [here.](ACSDCOSHowTo.md)
This set up is not for ACS Mesosphere DC/OS or ACS Kubernetes.
- For more information on Mesosphere DC/OS, please see [here.](https://docs.microsoft.com/en-us/azure/container-service/container-service-monitoring-oms)
- For Kubernetes, please see [here.](https://docs.microsoft.com/en-us/azure/container-service/container-service-kubernetes-oms) yaml file for the daemon-set is [here.](https://github.com/Microsoft/OMS-docker/tree/master/Kubernetes)
This set up provides a containerized Container Solution Agent (OMS Agent for Linux). If you are interested in a full OMS Agent for linux with Container Solution, please go [here.](https://github.com/Microsoft/OMS-Agent-for-Linux)
@ -37,7 +41,7 @@ This set up provides a containerized Container Solution Agent (OMS Agent for Lin
- Start the OMS container:
```
$>sudo docker run --privileged -d -v /var/run/docker.sock:/var/run/docker.sock -e WSID="your workspace id" -e KEY="your key" -p 127.0.0.1:25225:25225 --name="omsagent" -h=`hostname` --restart=always microsoft/oms
$>sudo docker run --privileged -d -v /var/run/docker.sock:/var/run/docker.sock -v /var/log:/var/log -v /var/opt/microsoft/omsagent/state/containerhostname:/etc/hostname -e WSID="your workspace id" -e KEY="your key" -p 127.0.0.1:25225:25225 -p 127.0.0.1:25224:25224/udp --name="omsagent" -h=`hostname` --restart=always microsoft/oms
```
### If you are switching from the installed agent to the container

Просмотреть файл

@ -14,8 +14,11 @@
- Bug fix
- Container Hostname provided container SHA ID information instead of the hostname.
##### OMS Agent 1.2.0-148 (03/xx/17) - Docker Provider 1.0.0-19
##### OMS Agent 1.3.2-15 (03/31/17) - Docker Provider 1.0.0-22
- Updated the container image to Ubuntu 16.04 LTS
- Graceful shutdown of OMS process
- Decrease containerized OMS Linux Agent size for lighter agent experience
- Increase buffer size
- Capture host syslog
- Bug fix
- segfault error due to libcontainer.so.
- segfault error due to libcontainer.so.