Superproject for Docker-Provider Project
The following information is provided in this README file:
- Introduction
- Build Environment
- Cloning Repository
- Building Instructions
- Running unit tests
- Final Kit Testing Instructions
- Code of Conduct
This project is a build superproject for the Docker Provider for OMI.
This project exists solely to set up the build environment/dependencies properly to build the Docker Provider for OMI properly. It also contains versioning information for use by the Jenkins build system.
-
The docker provider is intended to build on an Ubuntu 14.04 system. No other systems have been tested for build purposes.
-
The project assumes that the
sudo
command is permitted without any passwords. Please configure the/etc/sudoers
file appropriately. -
If the system will be used for Jenkins, then Java is required:
sudo apt-get install openjdk-7-jre
- Build dependencies are required. To install packages for building Docker-Cimprov, please execute:
sudo apt-get upgrade
sudo apt-get update
sudo apt-get install git g++ make pkg-config libssl-dev libpam0g-dev rpm librpm-dev uuid-dev
To clone the repository, execute the following command:
git clone --recursive git@github.com:Microsoft/Build-Docker-Provider.git bld-docker
To build the project, execute commands like:
cd bld-docker/docker/build
./configure --enable-ulinux
make
The resulting shell installation bundle will be found in
../target/Linux_ULINUX_1.0_x64_64_Release/
.
To run the unit tests, docker must be properly configured first. Note that these may change; for latest and greatest installation instructions, see the Docker Site.
Assuming the instructions from the Docker Site have not changed, execute:
curl -fsSL https://get.docker.com/ | sh
sudo apt-get install python-pip
sudo pip install docker-py
After docker is configured, then from the same build directory as above, run:
make test
To install the bundle run it with --install. For example (actual bundle name may be different):
sudo sh ../target/Linux_ULINUX_1.0_x64_64_Release/docker-cimprov-1.0.0-3.universal.x86_64.sh --install
After the shell bundle is installed, you can verify proper operations.
You will need to have some docker containers and images created on the server. To enumerate your containers run:
sudo docker ps -a
You can compare this output with the containers found by the OMS provider by running:
/opt/omi/bin/omicli ei root/cimv2 Container_ContainerInventory
To enumerate your images run:
sudo docker images
Compare this output with the images found by the OMS provider by running:
/opt/omi/bin/omicli ei root/cimv2 Container_ImageInventory
If you have running containers you can view statistics and events with these commands:
/opt/omi/bin/omicli ei root/cimv2 Container_ContainerStatistics
/opt/omi/bin/omicli ei root/cimv2 Container_DaemonEvent
This project has adopted the [Microsoft Open Source Code of Conduct] (https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ] (https://opensource.microsoft.com/codeofconduct/faq/) or contact opencode@microsoft.com with any additional questions or comments.