Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A standardized procedure was created using bandwidth measurement as an example. #1

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

wangyf2001
Copy link
Collaborator

The standard process for creating an Opennetlab application is that :
Read entrance definition
Make your program
Create Test pipeline
Adopt by OpenNetLab.
This example creates a standardized program, which corresponds to the "Make your program" section

- script: make
displayName: 'build network measure environment'

- script: cd /home ; sudo wget https://github.com/OpenNetLab/OpenNetLab-P2P-Measurment/blob/v-wangyif/std-process-pitch/machines.json
Copy link
Contributor

Choose a reason for hiding this comment

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

Should not use file in a personal repo.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

In that case, I need to submit a PR of the json file first, because the pipeline needs to download the test file from outside.

- task: Docker@2
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
inputs:
containerRegistry: 'opennetlab Azure registry'
Copy link
Contributor

Choose a reason for hiding this comment

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

Is that possible the name to OpenNetLab Azure Registry? Should we also change Azure side?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Similar to the challenge environment, we use opennetlab Azure registry.
image

if name not in machines:
raise ValueError("Not find such mahcine")

#print("iperf")
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove unnecessary comments in the code please.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Got it.

socket_timeout_sec = 240
machines_file = "machines.json"
sever_port = "8000"
sever_ip = "20.81.187.38"
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we use a fixed IP?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

How about change it to 0.0.0.0



def get_ssh(name):
client = paramiko.SSHClient()
Copy link
Contributor

Choose a reason for hiding this comment

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

Why we need to use paramiko?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

At that time, SCP was used for data transmission and SSH was needed.

doc.close()
netctr = get_ssh("netctr")
print("start scp")
scp_client = SCPClient(netctr.get_transport(), socket_timeout=30.0)
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's not start SCP to collect results

machines.json Outdated
"host" : "127.0.0.1",
"bw_port" : "8000",
"user" : "wang",
"pwd" : "123456789wang@"
Copy link
Contributor

Choose a reason for hiding this comment

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

Commit a password is not allowed in any case. Should use Keyvault if it is necessary.

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.

2 participants