GithubHelp home page GithubHelp logo

moffzilla / onap Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 77 KB

This project creates a running EC2 instance at AWS then install Docker, Kubernetes and deploys ONAP by Helm Charts.

License: MIT License

Python 2.77% Shell 97.23%

onap's Introduction

ONAP

This project creates a running EC2 instance at AWS then install Docker, Kubernetes and deploys ONAP by Helm Charts. Re-using roles and charts provided by zulcss.

Requirements

  • Running on Xenial (Cores=2 Mem=8G Root-Disk=30G)
  • This project has tested it in AWS Region: us-east-1
  • Please note that we mount an extra volume and use as default for Docker storage.
  • Make sure resources as the AMI image, SSH Keys, Security Groups referenced in the artifacts exist in the selected region.
  • This project defaults region US-West-1 (N. Virginia) & uses Ubuntu 16.04 guess OS.
  • You’ll need AWS CLI installed.
  • Before executing make sure you have access to AWS AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY AWS Region
  • More minimum requirements can be found examining the Playbooys.
  • You will need installed this Python module & Boto can be installed from your OS distribution or python’s using the pip command, install the AWS CLI and Boto3:

Deployment

Create the host with AWS CloudFormation

Under "~/deploy"

Execute:

aws cloudformation create-stack --stack-name ONAP-stack --template-body file://$PWD/deploy/aws-cloudformation-ONAP-Docker-Base.json

You can replace the following default settings:

KeyName": "generic-cloud-wk"

AnsibleRepository": https://github.com/moffzilla/ONAP-deploy.git"

AnsiblePlaybook: "deploy/ap_onap.yml"

    OOMTemplate: "minimal.cfg.j2"

Example: Please note this deploy OOM with customized K8 ( not Rancher ) using a different Repository and variables

aws cloudformation create-stack --stack-name ONAP-stack --template-body file://$PWD/deploy/aws-cloudformation-ONAP-Docker-Base.json --parameters ParameterKey=AnsibleRepository,ParameterValue=https://github.com/moffzilla/onap-deploy.git ParameterKey=AnsiblePlaybook,ParameterValue=deploy/site.yaml ParameterKey=InstanceType,ParameterValue=r4.16xlarge ParameterKey=OOMTemplate,ParameterValue=minimal.cfg.j2

You can also create the stack at the CloudFormation Console

Display:

aws cloudformation describe-stacks --stack-name ONAP-stack

You can see the public IP and FQDN then ssh to it

ssh ubuntu@<server IP>

Execute Script:

./runme.sh

Wait for the script to complete.

You could verify your deployment by (Please note it may take from 15 ~ 30 mins with minimal deployment depending on your compute resources ) :

helm list
                                                                            
helm status dev

It shows the status of the charts and associated Pods and Containers

kubectl get pods --all-namespaces -o=wide

It shows the status of Pods and Containers at Kubernetes level.

Remove:

aws cloudformation delete-stack --stack-name ONAP-stack

You can also delete the stack at the CloudFormation Console

Appendix - Tools:

The following tools are also included for resetting your enviroment

To terminate any AWS Instance created (it requires you to have installed aws cli) A) To remove all the Machines execute Script

'./terminate_all_instances.py' 

B) To remove an specific machine execute Script

'./list_instances.py'

'./terminate_instances.py [instance-id]'

C) Manually by AWS CLI

   'aws ec2 describe-instances | grep InstanceId'

   'aws ec2 terminate-instances --instance-ids [i-id]'

D) Retrieve Instance User Data To retrieve user data from within a running instance, use the following URI:

'http://169.254.169.254/latest/user-data'

F) To run an specific Role independetly

'sudo ansible-pull -U https://github.com/moffzilla/onap-deploy.git -e config=test.cfg.j2 deploy/roles/oom/tasks/main.yaml'

onap's People

Contributors

moffzilla avatar

Stargazers

Saugata Roy avatar

Watchers

James Cloos avatar  avatar

onap's Issues

Unable to deploy

Hi,

We were trying out your instructions for installing ONAP on AWS. We successfully created the stack in cloudformation.

Unfortunately, we were unable to go further as the script ./runme.sh did not execute and was asking for github authentication.

Will you please advise how to proceed.

Thanks,
Saugata.

P.S.: Error log...

ubuntu@ip-172-31-69-62:~$ ./runme.sh 
+ sudo ansible-pull -U https://github.com/moffzilla/ONAP-deploy -e config=test.cfg.j2 deploy/site.yaml -vvvv
ansible-pull 2.9.16
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/home/ubuntu/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/dist-packages/ansible
  executable location = /usr/bin/ansible-pull
  python version = 2.7.12 (default, Oct  5 2020, 13:56:01) [GCC 5.4.0 20160609]
Using /etc/ansible/ansible.cfg as config file
Starting Ansible Pull at 2021-01-05 18:18:15
/usr/bin/ansible-pull -U https://github.com/moffzilla/ONAP-deploy -e config=test.cfg.j2 deploy/site.yaml -vvvv
EXEC: /usr/bin/ansible  -i localhost, -e ansible_python_interpreter=/usr/bin/python  -c local  -vvvv -m git -a "name=https://github.com/moffzilla/ONAP-deploy dest=/home/ubuntu/.ansible/pull/ip-172-31-69-62.ec2.internal depth=1" all -l "localhost,ip-172-31-69-62,ip-172-31-69-62.ec2.internal,127.0.0.1" -e config=test.cfg.j2
ansible 2.9.16
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/home/ubuntu/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/dist-packages/ansible
  executable location = /usr/bin/ansible
  python version = 2.7.12 (default, Oct  5 2020, 13:56:01) [GCC 5.4.0 20160609]
Using /etc/ansible/ansible.cfg as config file
setting up inventory plugins
Set default localhost to localhost
Parsed localhost, inventory source with host_list plugin
[WARNING]: Could not match supplied host pattern, ignoring: ip-172-31-69-62
[WARNING]: Could not match supplied host pattern, ignoring: ip-172-31-69-62.ec2.internal
Loading callback plugin minimal of type stdout, v2.0 from /usr/lib/python2.7/dist-packages/ansible/plugins/callback/minimal.pyc
Skipping callback 'actionable', as we already have a stdout callback.
Skipping callback 'counter_enabled', as we already have a stdout callback.
Skipping callback 'debug', as we already have a stdout callback.
Skipping callback 'dense', as we already have a stdout callback.
Skipping callback 'dense', as we already have a stdout callback.
Skipping callback 'full_skip', as we already have a stdout callback.
Skipping callback 'json', as we already have a stdout callback.
Skipping callback 'minimal', as we already have a stdout callback.
Skipping callback 'null', as we already have a stdout callback.
Skipping callback 'oneline', as we already have a stdout callback.
Skipping callback 'selective', as we already have a stdout callback.
Skipping callback 'skippy', as we already have a stdout callback.
Skipping callback 'stderr', as we already have a stdout callback.
Skipping callback 'unixy', as we already have a stdout callback.
Skipping callback 'yaml', as we already have a stdout callback.
META: ran handlers
<localhost> ESTABLISH LOCAL CONNECTION FOR USER: root
<localhost> EXEC /bin/sh -c 'echo ~root && sleep 0'
<localhost> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /root/.ansible/tmp `"&& mkdir "` echo /root/.ansible/tmp/ansible-tmp-1609870695.87-3177-274800256064184 `" && echo ansible-tmp-1609870695.87-3177-274800256064184="` echo /root/.ansible/tmp/ansible-tmp-1609870695.87-3177-274800256064184 `" ) && sleep 0'
Using module file /usr/lib/python2.7/dist-packages/ansible/modules/source_control/git.py
<localhost> PUT /home/ubuntu/.ansible/tmp/ansible-local-3172h_FNCH/tmpnB_55K TO /root/.ansible/tmp/ansible-tmp-1609870695.87-3177-274800256064184/AnsiballZ_git.py
<localhost> EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1609870695.87-3177-274800256064184/ /root/.ansible/tmp/ansible-tmp-1609870695.87-3177-274800256064184/AnsiballZ_git.py && sleep 0'
<localhost> EXEC /bin/sh -c '/usr/bin/python /root/.ansible/tmp/ansible-tmp-1609870695.87-3177-274800256064184/AnsiballZ_git.py && sleep 0'
Username for 'https://github.com': 
Password for 'https://github.com': 
<localhost> EXEC /bin/sh -c 'rm -f -r /root/.ansible/tmp/ansible-tmp-1609870695.87-3177-274800256064184/ > /dev/null 2>&1 && sleep 0'
localhost | FAILED! => {
    "changed": false, 
    "cmd": [
        "/usr/bin/git", 
        "fetch", 
        "--depth", 
        "1", 
        "origin", 
        "master"
    ], 
    "invocation": {
        "module_args": {
            "accept_hostkey": false, 
            "archive": null, 
            "bare": false, 
            "clone": true, 
            "depth": 1, 
            "dest": "/home/ubuntu/.ansible/pull/ip-172-31-69-62.ec2.internal", 
            "executable": null, 
            "force": false, 
            "gpg_whitelist": [], 
            "key_file": null, 
            "name": "https://github.com/moffzilla/ONAP-deploy", 
            "recursive": true, 
            "reference": null, 
            "refspec": null, 
            "remote": "origin", 
            "repo": "https://github.com/moffzilla/ONAP-deploy", 
            "separate_git_dir": null, 
            "ssh_opts": null, 
            "track_submodules": false, 
            "umask": null, 
            "update": true, 
            "verify_commit": false, 
            "version": "HEAD"
        }
    }, 
    "msg": "Failed to download remote objects and refs:  remote: Repository not found.\nfatal: Authentication failed for 'https://github.com/moffzilla/ONAP-deploy/'\n"
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.