rancher-master.sh

docker-ubuntu-17.03.2.sh

update-version.sh

rancher-node.sh

node-nfs.sh

master-nfs.sh

master-helm.sh


Config intergration-override.yaml:

Writing deployment based on mr01 environment

1、 Copy file to the current user's catalogue

cp $HOME/oom/kubernetes/onap/values.yaml ~/integration-override.yaml


2、Modify the openstack configurationso in config:(user's name: demo password:onapdemo)

openStackUserName,the user's name added when building the program
openStackRegion: "RegionOne" default don't need
openStackKeyStoneUrl: "http://172.60.2.10:5000" openstark dashboard's address +5000 port
openStackServiceTenantName: "onap-casablanca01" the name of built project
openStackEncryptedPasswordHere: "bbaef6cd76625ab9eb60deedeae7dbb9" password encryption

encrytion algrithm:echo -n onapdemo| openssl aes-128-ecb -e -K aa3871669d893c7fb8abbcda31b88b4f -nosalt | xxd -c 256 -p


3、Modify the password of openStackEncryptedPasswordHere in the robot: module from integration-override.yaml

This password is the password produced by the encryption algrithm above

=======================================

Mpdify the openstark option in oom/kubernetes/robot/values.yaml

openStackEncryptedPasswordHere: "bbaef6cd76625ab9eb60deedeae7dbb9" is the value generated by the encryption algorithm above
openStackKeyStoneUrl: "http://172.60.2.10:5000" openstark dashboard's address +5000 port
openStackPassword: "onapdemo" the password of built user
openStackTenantId: "9ef561bd76254639b8e31eea4b56f179" project's projectID
openStackUserName: "demo" the user's name when building program
openStackProjectName: "onap-casablanca01" project's name

========================================

Testing procedure
execute oom/kubenetes/robot/demo-k8s.sh 's script
./demo-k8s.sh onap init



Kubectl Client Installation:

Ⅰ:Based on Linux system(Mac system is the same)

1、Download kubectl(1.11.5)
curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.11.5/bin/linux/amd64/kubectl

2、Downloaded file , add executing permission for kubectl
chmod +x ./kubectl
 mv ./kubectl /usr/bin

3、Build the default deploy route of kubectl
mkdir /root/.kube

4、Deploy kubectl, put the cluster credential(config) in the default deploy route of kubectl (If there is no local rz command , you should install or use other ways to upload config to the kubectl client machine )
rz
mv ./config /root/.kube/

5、Test visiting cluster
kubectl get node

6、kubectl command complete automatically
source /etc/bash_completion
source <(kubectl completion bash)
echo "source <(kubectl completion bash)" >> ~/.bashrc

source <(kubectl completion bash)
. /etc/bash_completion
alias k="kubectl"
alias ks="kubectl -n kube-system"


Ⅱ:Based on windows system

0、Before downloading kubectl,users should log in k8s master server first and use kubectl version to check the version number of cluster, choose the according kubectl versionto download. e.x.:cluster version number is 1.11.5, then the kubectl needed to be downloaded is 1.11.5 version.


1、Download kubectl
https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG.md?spm=5176.app53755.3.2.2uYdIN&file=CHANGELOG.md#client-binaries-17


2、Move kubectl to the root directory of D disk(it can be any route)

3、Build .kube file document under current user using command prompt(duanshuaixing,according to the actual user)
Execute under current user using command prompt
C:\Users\duanshuaixing> md .kube
Copy the downloaded config file to C:\Users\duanshuaixing\.kube\

4、After the command prompt, it will switch over to the route with kubectl.exe in it, test the linking cluster.
d:
kubectl.exe get node



Dynamically adding nodes:

Add a machine in cluster,deploy kubectl client, if you need to add volume, you should deploy nfs and mount rancher.

k8s add nodes dynamically(Take adding 10.0.0.5 as an example)

1、Build a virtual machine, execute rancher-node.sh script

2、 Modify /etc/exports at master node,add 10.0.0.5(rw,sync,no_root_squash,no_subtree_check) deployment

3、Validate the deployment exportfs -a

4、Execute slave_nfs_node.sh +master ip in newly-built virtual machine

5、Switch over to the according environment in rancher page, add host , copy docker command, and execute in the newly-add host.(if you can't add, you could try delete the node and readd it in rancher page.)


  • No labels