futurewei-cloud / Distrinet

Distributed Network emulator, based on Mininet
MIT License
3 stars 6 forks source link

Create lxc image for alcor-control-agent (aca) #14

Open cj-chung opened 2 years ago

cj-chung commented 2 years ago

Discussed in https://github.com/futurewei-cloud/Distrinet/discussions/6

Originally posted by **cj-chung** January 5, 2022 Distrinet comes with a ubuntu 18 as a host image and ubuntu18+ovs as a switch image by default. We need to create a lxc image to include aca in the host.
cj-chung commented 2 years ago

@a815027104 and @jiawei96-liu Do you have any progress about this issue?

a815027104 commented 2 years ago

After downloading the required files locally and modifying aca-machine-init.sh to use the local files for installation, the following problems still occurred. image Read cMakeOutput.log, CMakeOutput.log Determined that it may still rely on some libraries in the process of network problems, ready to try to install the vpn proxy in the lxd container。

zzxgzgz commented 2 years ago

After downloading the required files locally and modifying aca-machine-init.sh to use the local files for installation, the following problems still occurred. image Read cMakeOutput.log, CMakeOutput.log Determined that it may still rely on some libraries in the process of network problems, ready to try to install the vpn proxy in the lxd container。

Hi @a815027104 ,

Could you please share with us about how did you "download the required files locally and modify the aca-machine-init.sh"?

Based on the screenshot, the aca-machine-init.sh wasn't able to find the .cmake files. After downloading protobuf, did you install it, like how it was done in the script? Please take a look at line 79 of the src/CmakeLists.txt to get a better understanding of what the cmake is looking for.

Thank you.

a815027104 commented 2 years ago

According to your hints, I found that the problem is that I can't install grpc because there are too many submodules under grpc, so I choose to install it manually by transferring the required installation package externally. W QQ图片20220303002333 hen I got to step 7, the following problem occurred image

zzxgzgz commented 2 years ago

According to your hints, I found that the problem is that I can't install grpc because there are too many submodules under grpc, so I choose to install it manually by transferring the required installation package externally. W QQ图片20220303002333 hen I got to step 7, the following problem occurred image

Thank you for your update.

Do you mean that you downloaded the .debs manually, but when you tried to run

apt install -y ....

it gave you the error in your second screenshot?

I haven't met this before, but maybe you can try to following:

  1. Run the apt install -y ..., but add a -f before the -y, so something like apt install -f -y ......
  2. Since there are two .debs, and the client-dev depends on the client, you can try to run the install command for them separately. You can try to install the client first and then install the client-dev later.
a815027104 commented 2 years ago

I used the first approach and still reported the same error, which I suspect is caused by the substitution circled in red. QQ图片20220303183736 I used the first approach and still reported the same error, which I suspect is caused by the substitution circled in red. Then I did the installation separately and it still reported the error

a815027104 commented 2 years ago

123

zzxgzgz commented 2 years ago

123

What kind of CPU does that machine have? Is it a Intel/AMD chip or a ARM chip? I think I saw some silimar error when I tried to install ACA on a machine with ARM chips.

a815027104 commented 2 years ago

Both the lxd container and its host are AMD chips. image

zzxgzgz commented 2 years ago

Both the lxd container and its host are AMD chips. image

I just ran the aca-machine-init.sh again on my development machine, the "Note, selecting ... instead of ..." also appeared, but it gave no error. You can refer to the attached file. aca_installation_output.log

This machine is also an AMD machine: image

Is it possible to try to run the aca-machine-init.sh on your host machine, and see if it can build?

Thanks

zzxgzgz commented 2 years ago

Another thing I can think of is to exclude the pulsar code in ACA and try to build again, if you are not using the Pulsar functionatilies yet, which I think you aren't.

What you need to do is, comment out the pulsar related code in the following files, and then try to run aca-machine-init.sh again, to see if it can build successfully

Please give it a try and see how it goes. When you finishes the changes and compile again, you might see some code that I didn't mention above also has pulsar references, comment them out too.

Thank you.

cj-chung commented 2 years ago

@a815027104 any progress regarding this issue?

a815027104 commented 2 years ago

@a815027104 any progress regarding this issue? pulsar installation has been completed, there are still some problems in the last step of installing aca, mainly due to network problems, grpc's sub-modules are not installed in some parts of the installation process, still troubleshooting.

VanderChen commented 2 years ago

ACA has been built successfully in LXD container with image ubuntu:18.04. aca-machine-init.sh split into two functions download_dependencis and install_dependencis for solving network problems. This ACA LXD container still needs an end-to-end test.

VanderChen commented 2 years ago

The build scripts are involved in PR #279 to ACA.