Skip to content

[telemetry] add telemetry certs on DUT#1716

Merged
lguohan merged 9 commits intosonic-net:masterfrom
pra-moh:add_telemetry_certs
Jun 3, 2020
Merged

[telemetry] add telemetry certs on DUT#1716
lguohan merged 9 commits intosonic-net:masterfrom
pra-moh:add_telemetry_certs

Conversation

@pra-moh
Copy link
Contributor

@pra-moh pra-moh commented May 30, 2020

Description of PR

Adding server and dsmsroot certs to start telemetry in auth mode

  1. Declare server key/cer/csr under /group/all/vars inside telemetry_certs.yml
  2. Create variables to hold values from telemetry_certs.yml
  3. Create server and dsmsroot certs using private key and csr
  4. Copy all certs on localhost
  5. Copy certs from localhost to SONiC DUT

Summary:
Fixes # (issue)

Type of change

  • Bug fix
  • [X ] Testbed and Framework(new/improvement)
  • Test case(new/improvement)

Approach

How did you do it?

How did you verify/test it?

using deploy-mg on virtual test bed

Certs copied on SONiC DUT as shown below:
admin@vlab-01:/etc/sonic/telemetry$ ls -l
total 12
-rw-r--r-- 1 root root 1679 Jun 1 05:35 dsmsroot.key
-rw-r--r-- 1 root root 944 Jun 1 05:35 streamingtelemetryserver.cer
-rw-r--r-- 1 root root 1675 May 30 02:08 streamingtelemetryserver.key
admin@vlab-01:/etc/sonic/telemetry$

Any platform specific information?

Supported testbed topology if it's a new test case?

Documentation

Copy link
Contributor

@jleveque jleveque left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As comments. Also, the PR title is confusing. Why is this PR tagged with "[show]"?

@lguohan
Copy link
Contributor

lguohan commented May 30, 2020

can you paste the results on the ptf docker?

@lguohan
Copy link
Contributor

lguohan commented May 30, 2020

also, let's not do screenshot. it is hard to search. use markdown format https://www.markdownguide.org/basic-syntax#code-blocks

Copy link

@hui-ma hui-ma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ask a few question.

@pra-moh pra-moh changed the title [show] add telemetry certs on DUT add telemetry certs on DUT May 31, 2020
@pra-moh pra-moh changed the title add telemetry certs on DUT [telemetry] add telemetry certs on DUT May 31, 2020
@pra-moh
Copy link
Contributor Author

pra-moh commented Jun 1, 2020

can you paste the results on the ptf docker?

Currently, it doesn't run any tasks under -hosts :[ptf] so do not see any error/results

@pra-moh
Copy link
Contributor Author

pra-moh commented Jun 1, 2020

also, let's not do screenshot. it is hard to search. use markdown format https://www.markdownguide.org/basic-syntax#code-blocks

Updated. Let me know your feedback. Thanks!

Copy link
Contributor

@jleveque jleveque left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Wait for @lguohan to review, also.

@pra-moh
Copy link
Contributor Author

pra-moh commented Jun 2, 2020

LGTM. Wait for @lguohan to review, also.

Yes. Thanks!

@pra-moh
Copy link
Contributor Author

pra-moh commented Jun 3, 2020

can you paste the results on the ptf docker?

Currently, it doesn't run any tasks under -hosts :[ptf] so do not see any error/results

It gives no hosts matched PLAY [ptf] ********************************************************************************************************************************************************************************************************
skipping: no hosts matched

@lguohan lguohan merged commit 66d96fa into sonic-net:master Jun 3, 2020
- name: read server cer
set_fact:
server_cer: "{{ telemetry_certs['server_cer'] }}"
when: telemetry_certs['server_cer'] is defined
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pra-moh this is a typo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants