opencord

opencord安装

安装参考link: https://guide.opencord.org/quickstarts.html
我们采用 CORD-in-a-Box 场景去搭建opencord,如果没有资源可以在 https://www.cloudlab.us/ 申请资源cloudlab是和cord社区合作的

1
2
3
4
5
6
7
8
9
10
11
12
13
curl -o ~/cord-bootstrap.sh https://raw.githubusercontent.com/opencord/cord/master/scripts/cord-bootstrap.sh
chmod +x cord-bootstrap.sh
./cord-bootstrap.sh -v
cd ~/cord/build && \
make PODCONFIG=rcord-virtual.yml config && \
make -j4 build |& tee ~/build.out && \
make pod-test |& tee ~/test.out

问题1. 在ubuntu14.04上vagrant 安装libvirt plugin一直提示报错

报错如下

1
extconf.rb:73:in `<main>': libvirt library not found in default locations (RuntimeError)

解决方案

1
CONFIGURE_ARGS='with-ldflags=-L/opt/vagrant/embedded/lib with-libvirt-include=/usr/include/libvirt with-libvirt-lib=/usr/lib' GEM_HOME=~/.vagrant.d/gems GEM_PATH=$GEM_HOME:/opt/vagrant/embedded/gems PATH=/opt/vagrant/embedded/bin:$PATH vagrant plugin install vagrant-libvirt

问题2. vagrant 安装box时间太长,国内源太慢

解决方案:

1
2
1. 下载box,然后导入
2. 翻墙

问题3. qemu-img was not found in your path

执行vagrant mutate ubuntu/trusty64 libvirt –input-provider virtualbox
报错qemu-img was not found in your path

解决方案

1
apt-get install qemu-utils

问题4 ERROR: Unable to find an inventory file, specify one with -i ?

执行
ansible-playbook -i inventory/localhost devel-tools-playbook.yml
报错

1
ERROR: Unable to find an inventory file, specify one with -i ?

解决方案

1
找到localhost文件,换成rcode

makefile

主要的工作如下

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
1. prereqs-check:
2. build-local-bootstrap:
3. ciab-ovs:
4. vagrant-up:
5. vagrant-ssh-install:
6. config-ssh-key:
7. copy-cord:
8. cord-config:
9. prep-buildnode
10. prep-headnode:
11. deploy-elasticstack
12. prep-computenode:
# MaaS targets
13. build-maas-images:
14. maas-prime:
15. publish-maas-images:
16. deploy-maas:
# ONOS targets
17. build-onos-apps:
18. publish-onos-apps:
19. deploy-mavenrepo:
20. deploy-onos:
21. onos-debug:
# XOS targets
22. docker-images:
23. core-image:
# Requires ib_actions.yml file which is on the build host
24. publish-docker-images:
25. start-xos:
26. onboard-profile
# OpenStack targets
27. glance-images:
28. deploy-openstack:
29. deploy-computenode:
30. onboard-openstack:
# Post-onboarding targets
31. setup-automation:
# Additional CiaB targets
32. setup-ciab-pcu:
33. computes-up: setup-ciab-pcu
33. refresh-fabric:
# Testing targets
34. pod-test:
35. mcord-test:
36. mcord-spirent-test:
37. fabric-pingtest:
# Local Targets, bring up XOS containers without a VM
38. local-cord-config:
39. local-docker-images:
40. local-core-image:
41. local-start-xos:
42. local-onboard-profile:
  1. does文档

1. configure 生成所需要配置文件

生成配置文件

主要代码

1
2
3
4
5
6
7
8
9
10
11
12
config: $(CONFIG_FILES)
@echo ""
@echo "CORD is configured with profile: '$(PROFILE)', scenario: '$(SCENARIO)'"
@echo "Run 'make -j4 build' to continue."
$(CONFIG_FILES):
test -e "$(PODCONFIG_PATH)" || { echo "PODCONFIG file $(PODCONFIG_PATH) doesn't exist!" ; exit 1; }
ansible-playbook -i 'localhost,' --extra-vars="cord_podconfig='$(PODCONFIG_PATH)' genconfig_dir='$(GENCONFIG_D)' scenarios_dir='$(SCENARIOS_D)'" $(BUILD)/ansible/genconfig.yml $(LOGCMD)
printconfig:
@echo "Scenario: '$(SCENARIO)'"
@echo "Profile: '$(PROFILE)'"

坚持原创技术分享,您的支持将鼓励我继续创作!