Versions Compared

Key

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

Table of Contents

...

Auto Continuous Deployment via Jenkins and Kibana

Requirements

ReleaseKubernetesHelmKubectlDocker
Amsterdam1.7.x2.3.x1.7.x1.12.x
Beijing/master1.8.x2.7.x1.8.x17.03-ce




HD120G EBS

CPU8-32 vCPU

RAM64G

Option 0: Deploy OOM Kubernetes to a spot VM

...

Code Block
obrien:obrienlabs amdocs$ ssh ubuntu@dev.onap.info
ubuntu@ip-172-31-52-161:~$$ sudo apt install python-pip
ubuntu@ip-172-31-52-161:~$$ pip install awscli --upgrade --user
ubuntu@ip-172-31-52-161:~$$ aws --version
aws-cli/1.14.41 Python/2.7.12 Linux/4.4.0-1041-aws botocore/1.8.45

Configurure Access Keys for your Account

Code Block
ubuntu@ip-172-31-52-161:~$ aws$aws configure
AWS Access Key ID [None]: AK....Q
AWS Secret Access Key [None]: Dl....l
Default region name [None]: us-east-1
Default output format [None]: json
ubuntu@ip-172-31-52-161:~$ aws$aws ec2 describe-regions --output table
||  ec2.ca-central-1.amazonaws.com   |  ca-central-1    ||
....

...

Allocate an EIP static public IP (one-time)

https://docs.aws.amazon.com/cli/latest/reference/ec2/allocate-address.html

Code Block
$aws ec2 allocate-address
{    "PublicIp": "35.172..",     "Domain": "vpc",     "AllocationId": "eipalloc-2f743..."}


Create a Route53 Record Set - Type A (one-time)

...

Code Block
# request the usually cheapest $0.13 spot 64G EBS instance at AWS
aws ec2 request-spot-instances --spot-price "0.25" --instance-count 1 --type "one-time" --launch-specification file://aws_ec2_spot_cli.json

# don't pass in the the following - it will be generated for the EBS volume
            "SnapshotId": "snap-0cfc17b071e696816"
launch specification json
{       "ImageId": "ami-c0c964ba",
      "InstanceType": "r4.2xlarge",
      "KeyName": "obrien_systems_aws_20141115",
      "BlockDeviceMappings": [
        {
          "DeviceName": "/dev/sda1",
          "Ebs": {
            "DeleteOnTermination": true,
            "VolumeType": "gp2",
            "VolumeSize": 120
          }         }       ],
      "SecurityGroupIds": [ "sg-322c4842" ]
}
# results
{
    "SpotInstanceRequests": [         {
            "Status": {
                "Message": "Your Spot request has been submitted for review, and is pending evaluation.", 
                "Code": "pending-evaluation", 

...

Code Block
aws ec2 describe-spot-instance-requests  --spot-instance-request-id sir-1tyr5etg
            "InstanceId": "i-02a653592cb748e2702a653592cb748e2x",

Associate EIP with EC2 Instance

Can be done separately as long as it is in the first 30 sec during initialization and before rancher starts on the instance.

Code Block
aws$aws ec2 associate-address --instance-id i-02a653592cb748e2702a653592cb748e2x --allocation-id eipalloc-375c1d02375c1d0x
{     "AssociationId": "eipassoc-a4b5a293a4b5a29x"
}

Reboot EC2 Instance to apply DNS change to Rancher in AMI

Code Block
aws$aws ec2 reboot-instances --instance-ids i-02a653592cb748e2702a653592cb748e2x

Kubernetes Installation via CloudFormation

...

Stop Spot Instance

Code Block
obrienbiometrics:aws michaelobrien$$ aws ec2 terminate-instances --instance-ids i-0040425ac8c0d8f630040425ac8c0d8f6x
{
    "TerminatingInstances": [
        {
            "InstanceId": "i-0040425ac8c0d8f63", 
            "CurrentState": {
                "Code": 32, 
                "Name": "shutting-down"
            }, 
            "PreviousState": {
                "Code": 16, 
                "Name": "running"
            }
        }     ]
}


Verify Instance stopped


Video on Installing and Running the ONAP Demos#ONAPDeploymentVideos

...

I have created an AMI on Amazon AWS under the following ID that has a reference 20170825 tag of ONAP 1.0 running on top of Rancher

ami-b8f3f3c3 : onap-oom-k8s-10

https://console.aws.amazon.com/ec2/v2/home?region=us-east-1#Images:visibility=public-images;search=ami-b8f3f3c3;sort=name

...