Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

...

  1. Download the OOM project to the kubernetes master and run config

    Code Block
    git clone -b master https://gerrit.onap.org/r/p/oom.git
    cd oom/kubernetes/config/
    cp onap-parameters-sample.yaml onap-parameters.yaml
    ./createConfig.sh -n onap

    Make sure the onap config pod completed

    Code Block
    [centos@server-k8s-cluser-deploy1-kubernetes-master-host-jznn7y config]$ kubectl get pod --all-namespaces -a
    NAMESPACE     NAME                                                                              READY     STATUS      RESTARTS   AGE
    kube-system   etcd-server-k8s-cluser-deploy1-kubernetes-master-host-jznn7y                      1/1       Running     0          3h
    kube-system   kube-apiserver-server-k8s-cluser-deploy1-kubernetes-master-host-jznn7y            1/1       Running     0          3h
    kube-system   kube-controller-manager-server-k8s-cluser-deploy1-kubernetes-master-host-jznn7y   1/1       Running     0          3h
    kube-system   kube-dns-545bc4bfd4-9gm6s                                                         3/3       Running     0          3h
    kube-system   kube-proxy-46jfc                                                                  1/1       Running     0          3h
    kube-system   kube-proxy-cmslq                                                                  1/1       Running     0          3h
    kube-system   kube-proxy-pglbl                                                                  1/1       Running     0          3h
    kube-system   kube-proxy-sj6qj                                                                  1/1       Running     0          3h
    kube-system   kube-proxy-zzkjh                                                                  1/1       Running     0          3h
    kube-system   kube-scheduler-server-k8s-cluser-deploy1-kubernetes-master-host-jznn7y            1/1       Running     0          3h
    kube-system   tiller-deploy-5458cb4cc-ck5km                                                     1/1       Running     0          3h
    kube-system   weave-net-7z6zr                                                                   2/2       Running     0          3h
    kube-system   weave-net-bgs46                                                                   2/2       Running     0          3h
    kube-system   weave-net-g78lp                                                                   2/2       Running     1          3h
    kube-system   weave-net-h5ct5                                                                   2/2       Running     0          3h
    kube-system   weave-net-ww89n                                                                   2/2       Running     1          3h
    onap          config                                                                            0/1       Completed   0          1m
    
    
    

    Note: Currently OOM development is basend on Rancher Environment. Some config setting is not good for this K8S cluster.

    1. In [oom.git] / kubernetes / aai / values.yaml and [oom.git] / kubernetes / policy / values.yaml

      There is a constant Cluster IP. aaiServiceClusterIp: 10.43.255.254

      However this Cluster IP is not is the CIDR range for this cluster.

      Change it to  10.100.255.254

    2. In [oom.git] / kubernetes / sdnc / templates / nfs-provisoner-deployment.yaml

      The nfs-provisoner will create a volumes mount to /dockerdata-nfs/{{ .Values.nsPrefix }}/sdnc/data

      51       volumes:
      52         - name: export-volume
      53           hostPath:
      54             path: /dockerdata-nfs/{{ .Values.nsPrefix }}/sdnc/data
      In this K8s cluster the /dockerdata-nfs is already mounted to sync the config data between working nodes.
      That will cause error in nfs-procisoner container
      Change the code to

      -            path: /dockerdata-nfs/{{ .Values.nsPrefix }}/sdnc/data
      +            path: /nfs-provisioner/{{ .Values.nsPrefix }}/sdnc/data
      +            type: DirectoryOrCreate

  2. Upload the ONAP-helm TOSCA to Cloudify Manager GUI
    The code is under review :https://gerrit.onap.org/r/#/c/27751/
    Zip the helm derectory, and upload it to Cloudify Manager GUI


  3. Create depolyment



    Fill in the deployment name and kubernetes master floating IP. 


  4. Exectue Install workflow

    Deployments → ONAP-tets→ Execute workflow→ Install

    Results: 

...

https://github.com/cloudify-examples/cloudify-environment-setup

"Install Cloudify CLI. Make sure that your CLI is using a local profile. (You must have executed cfy profiles use local in your shell."

links to http://docs.getcloudify.org/4.1.0/installation/from-packages/

choose DEB http://cloudify.co/download/?__hstc=221760199.9bdbb305d23ca5158f6ca9d0c53213fb.1514563959145.1515820425603.1515852767517.3&__hssc=221760199.5.1515852767517&__hsfp=3454083596

switch to community tab

click DEB - verify you are human - fill out your name, email and company - get cloudify-cli-community-17.12.28.deb

scp the file up to your vm

Code Block
obrienbiometrics:_deployment michaelobrien$ scp ~/Downloads/cloudify-cli-community-17.12.28.deb ubuntu@cloudify.onap.info:~/
cloudify-cli-community-17.12.28.deb                                                                                                 39%   17MB   2.6MB/s   00:09 ETA
obrienbiometrics:_deployment michaelobrien$ ssh ubuntu@cloudify.onap.info
ubuntu@ip-172-31-19-14:~$ sudo su -
root@ip-172-31-19-14:~# cp /home/ubuntu/cloudify-cli-community-17.12.28.deb .
root@ip-172-31-19-14:~# sudo dpkg -i cloudify-cli-community-17.12.28.deb 
Selecting previously unselected package cloudify.
(Reading database ... 51107 files and directories currently installed.)
Preparing to unpack cloudify-cli-community-17.12.28.deb ...
You're about to install Cloudify!
Unpacking cloudify (17.12.28~community-1) ...
Setting up cloudify (17.12.28~community-1) ...
Thank you for installing Cloudify!

Configure the CLI

Code Block
root@ip-172-31-19-14:~# cfy profiles use local
Initializing local profile ...
Initialization completed successfully
Using local environment...
Initializing local profile ...
Initialization completed successfully

Download the archive

Code Block
wget https://github.com/cloudify-examples/cloudify-environment-setup/archive/latest.zip
root@ip-172-31-19-14:~# apt install unzip
root@ip-172-31-19-14:~# unzip latest.zip 
   creating: cloudify-environment-setup-latest/
  inflating: cloudify-environment-setup-latest/README.md  
  inflating: cloudify-environment-setup-latest/aws-blueprint.yaml  
  inflating: cloudify-environment-setup-latest/azure-blueprint.yaml  
  inflating: cloudify-environment-setup-latest/circle.yml  
  inflating: cloudify-environment-setup-latest/gcp-blueprint.yaml  
   creating: cloudify-environment-setup-latest/imports/
  inflating: cloudify-environment-setup-latest/imports/manager-configuration.yaml  
   creating: cloudify-environment-setup-latest/inputs/
  inflating: cloudify-environment-setup-latest/inputs/aws.yaml  
  inflating: cloudify-environment-setup-latest/inputs/azure.yaml  
  inflating: cloudify-environment-setup-latest/inputs/gcp.yaml  
  inflating: cloudify-environment-setup-latest/inputs/openstack.yaml  
  inflating: cloudify-environment-setup-latest/openstack-blueprint.yaml  
   creating: cloudify-environment-setup-latest/scripts/
   creating: cloudify-environment-setup-latest/scripts/manager/
  inflating: cloudify-environment-setup-latest/scripts/manager/configure.py  
  inflating: cloudify-environment-setup-latest/scripts/manager/create.py  
  inflating: cloudify-environment-setup-latest/scripts/manager/delete.py  
  inflating: cloudify-environment-setup-latest/scripts/manager/start.py  


Configure the archive with your AWS credentials


  • vpc_id: This is the ID of the vpc. The same vpc that your manager is attached to.
  • private_subnet_id: This is the ID of a subnet that does not have inbound internet access on the vpc. Outbound internet access is required to download the requirements. It must be on the same vpc designated by VPC_ID.
  • public_subnet_id: This is the ID of a subnet that does have internet access (inbound and outbound). It must be on the same vpc designated by VPC_ID.
  • availability_zone: The availability zone that you want your instances created in. This must be the same as your public_subnet_id and private_subnet_id.
  • ec2_region_endpoint: The AWS region endpint, such as ec2.us-east-1.amazonaws.com.
  • ec2_region_name: The AWS region name, such as ec2_region_name.
  • aws_secret_access_key: Your AWS Secret Access Key. See here for more info. This may not be provided as an environment variable. The string must be set as a secret.
  • aws_access_key_id: Your AWS Access Key ID. See here for more info. This may not be provided as an environment variable. The string must be set as a secret.


Install the archive

Code Block
# I am on AWS EC2
root@ip-172-31-19-14:~# cfy install cloudify-environment-setup-latest/aws-blueprint.yaml -i cloudify-environment-setup-latest/inputs/aws.yaml --install-plugins --task-retries=30 --task-retry-interval=5
Initializing local profile ...
Initialization completed successfully
Initializing blueprint...


#30 sec
Collecting https://github.com/cloudify-incubator/cloudify-utilities-plugin/archive/1.4.2.1.zip (from -r /tmp/requirements_whmckn.txt (line 1))2018-01-13 15:28:40.563  CFY <cloudify-environment-setup-latest> [cloudify_manager_ami_i29qun.create] Task started 'cloudify_awssdk.ec2.resources.image.prepare'
2018-01-13 15:28:40.639  CFY <cloudify-environment-setup-latest> [vpc_w1tgjn.create] Task failed 'cloudify_aws.vpc.vpc.create_vpc' -> EC2ResponseError: 401 Unauthorized
<?xml version="1.0" encoding="UTF-8"?>
<Response><Errors><Error><Code>AuthFailure</Code><Message>AWS was not able to validate the provided access credentials</Message></Error></Errors><RequestID>d8e7ff46-81ec-4a8a-8451-13feef29737e</RequestID></Response>
2018-01-13 15:28:40.643  CFY <cloudify-environment-setup-latest> 'install' workflow execution failed: Workflow failed: Task failed 'cloudify_aws.vpc.vpc.create_vpc' -> EC2ResponseError: 401 Unauthorized
<?xml version="1.0" encoding="UTF-8"?>
<Response><Errors><Error><Code>AuthFailure</Code><Message>AWS was not able to validate the provided access credentials</Message></Error></Errors><RequestID>d8e7ff46-81ec-4a8a-8451-13feef29737e</RequestID></Response>
Workflow failed: Task failed 'cloudify_aws.vpc.vpc.create_vpc' -> EC2ResponseError: 401 Unauthorized
<?xml version="1.0" encoding="UTF-8"?>
<Response><Errors><Error><Code>AuthFailure</Code><Message>AWS was not able to validate the provided access credentials</Message></Error></Errors><RequestID>d8e7ff46-81ec-4a8a-8451-13feef29737e</RequestID></Response>


I forgot to add my AWS auth tokens - editing....rerunning




Multi VIM: Amazon AWS EC2 + Microsoft Azure VM

...