...
In order to set some custom static hostname, a command can be used:
hostnamectl set-hostname <host_name>
...
In order to execute playbooks, inventory.ini
must be configure configured to include specific hosts to run the playbooks on.
...
# ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa): <ENTER>
Enter passphrase (empty for no passphrase): <ENTER>
Enter same passphrase again: <ENTER>
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:vlcKVU8Tj8nxdDXTW6AHdAgqaM/35s2doon76uYpNA0 root@host
The key's randomart image is:
+---[RSA 2048]----+
| .oo.==*|
| . . o=oB*|
| o . . ..o=.=|
| . oE. . ... |
| ooS. |
| ooo. . |
| . ...oo |
| . .*o+.. . |
| =O==.o.o |
+----[SHA256]-----+
Then, the generated key must be copied to every host from the inventory. It is done by running ssh-copy-id
, e.g.:
...
Developer Guide and Troubleshooting
Developer Guide
Start by following the page Setting Up Your Development Environment, this covers items such as signing up for a linux foundation account, configuring git, installing gerrit and IDE recommendations.
Clone 5G-MEC-CLOUD-GAMING Code
Access Visit https://gerrit.akraino.org/r/admin/repos/5g-mec-cloud-gaming to get obtain the git clone command and clone projects. The clone command is as follows:
- git clone "https://gerrit.akraino.org/r/5g-mec-cloud-gaming"
Download Submodule
commands.
Download Submodule
- git submodule git submodule update --init --recursive
...
Setup
...
Environment
Enter the work directory
...
enter test dir:
- cd . ./5g-mec-cloud-gaming
Execute the versify.sh script to setup set up the test build environment:
versify.sh script first installs Golang and ginkgo,then installs docker and docker-compose.
Unit Testing
This part is also included in versify.sh script. The commands for the three submodules are as follows:
- make -C 5GCEmulator/ngc build && make -C 5GCEmulator/ngc test-unit-nef
- make -C edgenode networkedge
- make -C edgecontroller build-dnscli && make -C edgecontroller test-dnscli
Unistall Guide
Role of cleanup playbook is to revert changes made by deploy playbooks. Convention for the scripts is: action_mode.sh [group]. Following script is available for cleanup:
- cleanup_ne.sh [控制器| 节点]
Teardown is made by going step by step in reverse order and undoing the steps. For example, playbooks for Edge Controller/Kubernetes master must be executed before playbooks for Edge Nodes. During the unistall operation, the cleanup script of Edge Nodes should be executed first, and then run the cleanup script of Edge Controller / Kubernetes master.
Note that there might be some leftovers created by installed software.
Troubleshooting
Golang:
wget https://dl.google.com/go/ go1.13.4.linux-amd64.tar.gz
export GOPATH=$HOME/go
export PATH=$PATH:$GOPATH/bin
Ginkgo:
go get github.com/onsi/ginkgo/ginkgo
go get github.com/onsi/gomega/
Docker:
yum install -y yum-utils device-mapper-persistent-data lvm2
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
yum install -y docker-ce docker-ce-cli containerd.io
Docker-compose:
curl -L "https://github.com/docker/compose/releases/download/1.24.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
Running Playbooks
For convenience, playbooks can be executed by running helper deployment scripts.
NOTE: All nodes provided in the inventory may reboot during the installation.
Convention for the scripts is: action_mode.sh [group]. Following scripts are available for Network Edge mode:
- deploy_ne.sh [ controller | nodes ]
To run deploy of only Edge Nodes or Edge Controller use deploy_ne.sh nodes and deploy_ne.sh controller respectively.
NOTE: Playbooks for Edge Controller/Kubernetes master must be executed before playbooks for Edge Nodes.
NOTE: Edge Nodes and Edge Controller must be set up on different machines.
Uninstall Guide
The role of cleanup playbook is to revert changes made by deploy playbooks. The convention for the scripts is: action_mode.sh [group]. Following script is available for cleanup:
- cleanup_ne.sh [ controller | nodes]
The teardown is made by going step by step in reverse order and undoing the steps. For example, playbooks for Edge Controller/Kubernetes master must be executed before playbooks for Edge Nodes. During the unistall operation, the cleanup script of Edge Nodes should be executed first, and then run the cleanup script of Edge Controller / Kubernetes master.
Note that there might be some leftovers created by installed software.
Troubleshooting
Proxy issues
For PRC users who have network problems, try the following mirrors.
- Kubernetes
Kubernetes repo URL: https://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64, as a replacement of https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64.
Kubernetes repo key: https://mirrors.aliyun.com/kubernetes/yum/doc/yum-key.gpg, as a replacement of https://packages.cloud.google.com/yum/doc/yum-key.gpg.
https://mirrors.aliyun.com/kubernetes/yum/doc/rpm-package-key.gpg, as a replacement of https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg.
- Kubeovn
Kubeovn repo: https://gitee.com/mirrors/Kube-OVN.git, as a replacement of https://github.com/alauda/kube-ovn.git.
Kubeovn raw file repo: https://gitee.com/mirrors/Kube-OVN/raw, as a replacement of https://raw.githubusercontent.com/alauda/kube-ovn.
Useful Commands
To display pods deployed in the default namespace:
kubectl get pods
...