This is the Stackdriver Metadata agent.
-
Install runtime dependencies:
$ sudo apt-get install -y libboost-filesystem1.55.0 \ libboost-program-options1.55.0 libboost-system1.55.0 \ libboost-thread1.55.0 libyajl2
-
Install build dependencies:
$ sudo apt-get install -y cmake dpkg-dev g++ libboost-atomic1.55-dev \ libboost-chrono1.55-dev libboost-date-time1.55-dev \ libboost-filesystem1.55-dev libboost-program-options1.55-dev \ libboost-regex1.55-dev libboost-system1.55-dev \ libboost-thread1.55-dev libboost-timer1.55-dev libboost1.55-dev \ libssl-dev libyajl-dev
-
Install runtime dependencies:
$ sudo apt-get install -y ca-certificates libboost-filesystem1.58.0 \ libboost-program-options1.58.0 libboost-system1.58.0 \ libboost-thread1.58.0 libssl1.0.0 libyajl2
-
Install build dependencies:
$ sudo apt-get install -y cmake dpkg-dev g++ 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-system1.58-dev \ libboost-thread1.58-dev libboost-timer1.58-dev libboost1.58-dev \ libssl-dev libyajl-dev
-
Install runtime dependencies:
$ sudo apt-get install -y ca-certificates libboost-filesystem1.62.0 \ libboost-program-options1.62.0 libboost-system1.62.0 \ libboost-thread1.62.0 libssl1.0.2 libyajl2
-
Install build dependencies:
$ sudo apt-get install -y cmake dpkg-dev g++ 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-system1.62-dev \ libboost-thread1.62-dev libboost-timer1.62-dev libboost1.62-dev \ libssl1.0-dev libyajl-dev
-
Prepare external boost repo:
$ sudo tee /etc/yum.repos.d/puias-computational-x86_64.repo << EOM [puias-computational-x86_64] name=PUIAS Computational x86_64 baseurl=http://springdale.math.ias.edu/data/puias/computational/7/x86_64 enabled=1 gpgcheck=1 EOM $ sudo rpm --import http://springdale.math.ias.edu/data/puias/7/x86_64/os/RPM-GPG-KEY-puias
-
Install runtime dependencies:
$ sudo yum install -y boost155-filesystem boost155-program-options \ boost155-system boost155-thread yajl
-
Install build dependencies:
$ sudo yum install -y boost155-devel cmake gcc-c++ make openssl-devel \ rpm-build yajl-devel
-
Set up Boost root:
$ sudo tee /etc/profile.d/boost.sh << EOM export BOOST_ROOT=/usr/local/boost/1.55.0 export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$BOOST_ROOT/lib64" EOM $ . /etc/profile.d/boost.sh
-
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 && brew link --force boost\@1.60 && \ (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 deb
If 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 rpm
If 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 $ ./metadatad
The agent will use the default credentials locations or the metadata server.
-
Run the agent with modified configuration:
$ cd src $ ./metadatad sample_agent_config.yaml
The default credentials location in the sample configuration is
/tmp/token.json
.