This is the Stackdriver metadata agent.
-
Install runtime dependencies:
$ sudo apt-get install libssl1.0.0 libyajl2 libboost-filesystem1.58.0 \ libboost-program-options1.58.0 libboost-system1.58.0 \ libboost-thread1.58.0 ca-certificates -
Install build dependencies:
$ sudo apt-get install g++ cmake dpkg-dev libyajl-dev libssl-dev \ libboost1.58-dev libboost-system1.58-dev libboost-atomic1.58-dev \ libboost-chrono1.58-dev libboost-date-time1.58-dev \ libboost-filesystem1.58-dev libboost-program-options1.58-dev \ libboost-regex1.58-dev libboost-thread1.58-dev libboost-timer1.58-dev
-
Install runtime dependencies:
$ sudo apt-get install libssl1.0.2 libyajl2 libboost-filesystem1.62.0 \ libboost-program-options1.62.0 libboost-system1.62.0 \ libboost-thread1.62.0 ca-certificates -
Install build dependencies:
$ sudo apt-get install g++ cmake dpkg-dev libyajl-dev libssl1.0-dev \ libboost1.62-dev libboost-system1.62-dev libboost-atomic1.62-dev \ libboost-chrono1.62-dev libboost-date-time1.62-dev \ libboost-filesystem1.62-dev libboost-program-options1.62-dev \ libboost-regex1.62-dev libboost-thread1.62-dev libboost-timer1.62-dev
-
Install runtime dependencies:
Note: this currently does not work with [email protected], which is the latest available from Homebrew as of 2018/05/17.
$ brew install openssl $ brew install boost\@1.60 -c++11 && \ (cd /usr/local/lib && ln -s libboost_thread-mt.a libboost_thread.a && \ ln -s libboost_thread-mt.dylib libboost_thread.dylib) $ brew install yajl -
Install build dependencies:
$ brew install cmake
-
Build the metadata agent:
$ cd src $ make -j10
-
Run all tests:
$ cd src $ make test -
Run individual tests:
$ cd test $ make <test_name> $ ./<test_name>
-
Build the DEB package:
$ cd src $ make debIf you want to embed the distro name (e.g., "xenial") into the package filename, use:
$ cd src $ make DISTRO=xenial deb -
Build the RPM package:
$ cd src $ make rpmIf you want to embed the distro name (e.g., "el7") into the package filename, use:
$ cd src $ make DISTRO=el7 rpm
-
Run the agent with default settings:
$ cd src $ ./metadatadThe agent will use the default credentials locations or the metadata server.
-
Run the agent with modified configuration:
$ cd src $ ./metadatad sample_agent_config.yamlThe default credentials location in the sample configuration is
/tmp/token.json.