This repository was archived by the owner on Aug 31, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 95
Update Build Steps #42
Open
TildenWinston
wants to merge
14
commits into
sonic-net:master
Choose a base branch
from
TildenWinston:build-docs
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 8 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
1f7b6f4
Removing testdata for windows compatibility.
TildenWinston b3f927c
resetting back to default
TildenWinston b4e7a34
Merge branch 'master' of https://github.com/TildenWinston/sonic-telem…
TildenWinston 73aa3da
Reset to master repo
TildenWinston 5bdea16
[testdata] Update SFP keys to align with new standard (#39)
jleveque 9903bd2
Update gnmi deps (#40)
seiferteric 6d663a3
Updating build steps
TildenWinston 9b45518
Adding common error table
TildenWinston 5d4a883
Merge branch 'master' into build-docs
TildenWinston faa6ce9
Spelling fix
TildenWinston c9b261f
Clarifying instructions, fixing format
TildenWinston d08fe42
Update README.md
TildenWinston c2ab476
Update README.md
TildenWinston b8847c2
Update README.md
TildenWinston File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,35 +9,60 @@ This repository contains implementation for the sonic system telemetry services: | |
|
|
||
| ### Prerequisites | ||
|
|
||
| Install __go__ in your system https://golang.org/doc/install. Requires golang1.8+. | ||
| * Install __go__ in your system https://golang.org/doc/install. Requires golang1.8+. | ||
| * Install Git | ||
| * Install Libpcre3-dev using: sudo apt install -y libpcre3-dev | ||
| * Install Customized version of libyang. These can obtained from a local sonic-buildimage folder and installed using the command: | ||
|
|
||
| ## Installing | ||
|
|
||
| To install dial-in mode system telemetry server, run | ||
| sudo dpkg -i ${buildimage}/target/debs/stretch/libyang*.deb | ||
|
|
||
| go get -u github.com/Azure/sonic-telemetry/telemetry | ||
| or the can be download from Jenkins and installed individually. Libyang, Libyang-cpp, Libyang-dbg, and Libyang-dev all need to be installed. https://sonic-jenkins.westus2.cloudapp.azure.com/job/generic/job/buildimage-baseimage/lastSuccessfulBuild/artifact/sonic-buildimage/target/debs/buster/ | ||
| * Install PCRE http://www.pcre.org/ compiled with --enable-unicode-properties. A compiling guide can be found https://mac-dev-env.patrickbougie.com/pcre/ | ||
|
|
||
| To install dial-out mode system telemetry client, run | ||
|
|
||
| go get -u github.com/Azure/sonic-telemetry/dialout/dialout_client_cli | ||
| ## Installing | ||
|
|
||
| There is also a test program dialout_server_cli for collecting data from dial-out mode system telemetry client. _Note_: it is for testing purpose only. | ||
| There is a test program dialout_server_cli for collecting data from dial-out mode system telemetry client. _Note_: it is for testing purpose only. Only go is a prerequisite. | ||
|
|
||
| go get -u github.com/Azure/sonic-telemetry/dialout/dialout_server_cli | ||
|
|
||
| The binaries will be installed under $GOPATH/bin/, they may be copied to any SONiC switch and run there. | ||
|
|
||
| You can also build a debian package and install it: | ||
| You can build SONiC-telemetry into a debian package and install it: | ||
|
|
||
| git clone https://github.com/Azure/sonic-mgmt-common.git | ||
| git clone https://github.com/Azure/sonic-telemetry.git | ||
| pushd sonic-telemetry | ||
| dpkg-buildpackage -rfakeroot -b -us -uc | ||
| popd | ||
|
|
||
| cd sonic-mgmt-common | ||
| make | ||
| sudo dh_install -psonic-mgmt-common -P/-v | ||
|
|
||
|
|
||
| cd sonic-telemetry | ||
| make | ||
| sudo install testdata/database_config.json -t /var/run/redis/sonic-db <- sometimes the sonic-db folder must be created manually. | ||
| export CVL_SCHEMA_PATH=/usr/sbin/schema <- This must be performed everytime it is run. | ||
|
|
||
|
|
||
| To test that it worked: | ||
|
|
||
| ./build/bin/telemetry --help | ||
|
|
||
| Steps written with Ubuntu 18.04 in July 2020. | ||
|
|
||
| ### Running | ||
| * See [SONiC gRPC telemetry](./doc/grpc_telemetry.md) for how to run dial-in mode system telemetry server | ||
| * See [SONiC telemetry in dial-out mode](./doc/dialout.md) for how to run dial-out mode system telemetry client | ||
|
|
||
| ### Common Errors | ||
| | Error | Solution | | ||
| | ----------------------- | ----------------------- | | ||
| | sudo install testdata/database_config.json -t /var/run/redis/sonic-db <br /> install: failed to access '/var/run/redis/sonic-db': No such file or directory | Manually create the missing folder (/var/run/redis/sonic-db) and try again | | ||
| | ./build/bin/dialout client cli -insecure -logtostderr -v 1 <br /> libyang[0]: Unable to use search directory "schema/" (No such file or directory) <br /> panic: runtime error: invalid memory address or nil pointer dereference <br />[signal SIGSEGV: segmentation violation code=0x1 addr=0x50 pc=0x958402] | Ensure that Ensure that CVL_SCHEMA_PATH is properly exported. export CVL_SCHEMA_PATH=/usr/sbin/schema must be run every time | | ||
| | user@buitd:-/Desktop/sonic$ make -C sonic-telemetry <br /> make: Entering directory '/home/user/Desktop/sonic/sonic -telemetry' <br /> # FIXME temporary workaround for crypto not downloading.. <br /> /usr/local/go/bin/go get golang.org/x/crypto/ssh/terminal@e9b2fee46413 <br />go: found golang.org/x/crypto/ssh/terminal in golang.org/x/crypto vO.O.O-20191206172530-e9b2fee46413 <br /> # golang.org/x/sys/unix../../../go/pkg/mod/golang.org/x/[email protected] <br /> 2-f1bc736245b1/unix/syscall unix.go: 16: 2: import /home/user/. cache/go - bui Id/08/08624f22b1129d677c1be2d3e3fe2b94a <br />f75a12b875aOc9b4e5c521fe24ff51e-d: reading input: EOF <br />Makefile: 33: recipe for target 'vendor/. done' failed <br />make: *** [vendor/. done] Error 2 <br /> make: Leaving directory '/home/user/Desktop/sonic/sonic-telemetry' | Package cache is corrupted. Delete $HOME/.cache/go-build and try again. If it still fails, delete /tmp/go/pkg directory as well. | ||
|
|
||
|
|
||
|
|
||
|
|
||
| ## Need Help? | ||
|
|
||
| For general questions, setup help, or troubleshooting: | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.