mshaik@noc:~$ pip install awsebcli –upgrade –user
The program ‘pip’ is currently not installed. You can install it by typing:
sudo apt install python-pip
mshaik@noc:~$ sudo apt install python-pip
mshaik@noc:~$ pip install awsebcli –upgrade –user
Collecting awsebcli
Downloading awsebcli-3.12.3.tar.gz (242kB)
100% |████████████████████████████████| 245kB 689kB/s
Collecting pyyaml>=3.11 (from awsebcli)
Downloading PyYAML-3.12.tar.gz (253kB)
100% |████████████████████████████████| 256kB 1.4MB/s
Collecting botocore>=1.0.1 (from awsebcli)
Downloading botocore-1.9.4-py2.py3-none-any.whl (4.1MB)
100% |████████████████████████████████| 4.1MB 265kB/s
Collecting cement==2.8.2 (from awsebcli)
Downloading cement-2.8.2.tar.gz (165kB)
100% |████████████████████████████████| 174kB 2.4MB/s
Collecting colorama==0.3.7 (from awsebcli)
Downloading colorama-0.3.7-py2.py3-none-any.whl
Collecting pathspec==0.5.5 (from awsebcli)
Downloading pathspec-0.5.5.tar.gz
Collecting setuptools>=20.0 (from awsebcli)
Downloading setuptools-38.5.2-py2.py3-none-any.whl (490kB)
100% |████████████████████████████████| 491kB 1.1MB/s
Collecting docopt<0.7,>=0.6.1 (from awsebcli)
Downloading docopt-0.6.2.tar.gz
Collecting requests<=2.9.1,>=2.6.1 (from awsebcli)
Downloading requests-2.9.1-py2.py3-none-any.whl (501kB)
100% |████████████████████████████████| 501kB 1.3MB/s
Collecting websocket-client<1.0,>=0.11.0 (from awsebcli)
Downloading websocket_client-0.47.0-py2.py3-none-any.whl (200kB)
100% |████████████████████████████████| 204kB 2.3MB/s
Collecting dockerpty<=0.4.1,>=0.3.2 (from awsebcli)
Downloading dockerpty-0.4.1.tar.gz
Collecting semantic_version==2.5.0 (from awsebcli)
Downloading semantic_version-2.5.0.tar.gz
Collecting tabulate==0.7.5 (from awsebcli)
Downloading tabulate-0.7.5.tar.gz
Collecting termcolor==1.1.0 (from awsebcli)
Downloading termcolor-1.1.0.tar.gz
Collecting blessed>=1.9.5 (from awsebcli)
Downloading blessed-1.14.2-py2.py3-none-any.whl (64kB)
100% |████████████████████████████████| 71kB 3.5MB/s
Collecting jmespath<1.0.0,>=0.7.1 (from botocore>=1.0.1->awsebcli)
Downloading jmespath-0.9.3-py2.py3-none-any.whl
Collecting docutils>=0.10 (from botocore>=1.0.1->awsebcli)
Downloading docutils-0.14-py2-none-any.whl (543kB)
100% |████████████████████████████████| 552kB 1.0MB/s
Collecting python-dateutil<3.0.0,>=2.1 (from botocore>=1.0.1->awsebcli)
Downloading python_dateutil-2.6.1-py2.py3-none-any.whl (194kB)
100% |████████████████████████████████| 194kB 2.1MB/s
Collecting six (from websocket-client<1.0,>=0.11.0->awsebcli)
Downloading six-1.11.0-py2.py3-none-any.whl
Collecting wcwidth>=0.1.4 (from blessed>=1.9.5->awsebcli)
Downloading wcwidth-0.1.7-py2.py3-none-any.whl
Building wheels for collected packages: awsebcli, pyyaml, cement, pathspec, docopt, dockerpty, semantic-version, tabulate, termcolor
Running setup.py bdist_wheel for awsebcli … done
Stored in directory: /home/mshaik/.cache/pip/wheels/a4/6b/b7/a73c26d938b0d72715048991ef10ba1f26f70bbbc85056c069
Running setup.py bdist_wheel for pyyaml … done
Stored in directory: /home/mshaik/.cache/pip/wheels/2c/f7/79/13f3a12cd723892437c0cfbde1230ab4d82947ff7b3839a4fc
Running setup.py bdist_wheel for cement … done
Stored in directory: /home/mshaik/.cache/pip/wheels/83/81/57/11cd272951142cdc4a078aa419a57ad8f05499eb3eaaa1ca72
Running setup.py bdist_wheel for pathspec … done
Stored in directory: /home/mshaik/.cache/pip/wheels/21/7b/4d/df92c0e6e329779e98d2b6bfd58cc7ce80d2bfed23660328c6
Running setup.py bdist_wheel for docopt … done
Stored in directory: /home/mshaik/.cache/pip/wheels/b2/16/5f/c33a2bb5f2dce71205f8e65cbfd05647d79d441282be31fd82
Running setup.py bdist_wheel for dockerpty … done
Stored in directory: /home/mshaik/.cache/pip/wheels/ae/d5/14/a25cbb003bd70ffefba0fdfbd5a5c4ea4d2a11bde7736f7482
Running setup.py bdist_wheel for semantic-version … done
Stored in directory: /home/mshaik/.cache/pip/wheels/f3/fb/c6/fdd482f368046e8ef318ba64751608f9859dc20ebf1409c91c
Running setup.py bdist_wheel for tabulate … done
Stored in directory: /home/mshaik/.cache/pip/wheels/2e/3b/9d/fd2040f3513decad8244f721c027b70d7868fe2fc0a7c06e5e
Running setup.py bdist_wheel for termcolor … done
Stored in directory: /home/mshaik/.cache/pip/wheels/de/f7/bf/1bcac7bf30549e6a4957382e2ecab04c88e513117207067b03
Successfully built awsebcli pyyaml cement pathspec docopt dockerpty semantic-version tabulate termcolor
Installing collected packages: pyyaml, jmespath, docutils, six, python-dateutil, botocore, cement, colorama, pathspec, setuptools, docopt, requests, websocket-client, dockerpty, semantic-version, tabulate, termcolor, wcwidth, blessed, awsebcli
Successfully installed awsebcli blessed botocore cement colorama dockerpty docopt docutils jmespath pathspec python-dateutil pyyaml-3.11 requests semantic-version setuptools-20.7.0 six-1.10.0 tabulate termcolor wcwidth websocket-client
You are using pip version 8.1.1, however version 9.0.1 is available.
You should consider upgrading via the ‘pip install –upgrade pip’ command.
mshaik@noc:~$ eb –version
EB CLI 3.12.3 (Python 2.7.1)
mshaik@noc:~$ eb
usage: eb (sub-commands …) [options …] {arguments …}
Welcome to the Elastic Beanstalk Command Line Interface (EB CLI).
For more information on a specific command, type “eb {cmd} –help”.
commands:
abort Cancels an environment update or deployment.
appversion Listing and managing application versions
clone Clones an environment.
codesource Configures the code source for the EB CLI to use by default.
config Modify an environment’s configuration. Use subcommands to manage saved configurations.
console Opens the environment in the AWS Elastic Beanstalk Management Console.
create Creates a new environment.
deploy Deploys your source code to the environment.
events Gets recent events.
health Shows detailed environment health.
init Initializes your directory with the EB CLI. Creates the application.
labs Extra experimental commands.
list Lists all environments.
local Runs commands on your local machine.
logs Gets recent logs.
open Opens the application URL in a browser.
platform Commands for managing platforms.
printenv Shows the environment variables.
restore Restores a terminated environment.
scale Changes the number of running instances.
setenv Sets environment variables.
ssh Opens the SSH client to connect to an instance.
status Gets environment information and status.
swap Swaps two environment CNAMEs with each other.
tags Allows adding, deleting, updating, and listing of environment tags.
terminate Terminates the environment.
upgrade Updates the environment to the most recent platform version.
use Sets default environment.
optional arguments:
-h, –help show this help message and exit
–debug toggle debug output
–quiet suppress all output
-v, –verbose toggle verbose output
–profile PROFILE use a specific profile from your credential file
-r REGION, –region REGION
use a specific region
–no-verify-ssl do not verify AWS SSL certificates
–version show application/version info
To get started type “eb init”. Then type “eb create” and “eb open”
mshaik@noc:~$ mkdir HelloWorld
mshaik@noc:~$ cd HelloWorld
mshaik@noc:~/HelloWorld$ eb init -p PHP
Select a default region
1) us-east-1 : US East (N. Virginia)
2) us-west-1 : US West (N. California)
3) us-west-2 : US West (Oregon)
4) eu-west-1 : EU (Ireland)
5) eu-central-1 : EU (Frankfurt)
6) ap-south-1 : Asia Pacific (Mumbai)
7) ap-southeast-1 : Asia Pacific (Singapore)
8) ap-southeast-2 : Asia Pacific (Sydney)
9) ap-northeast-1 : Asia Pacific (Tokyo)
10) ap-northeast-2 : Asia Pacific (Seoul)
11) sa-east-1 : South America (Sao Paulo)
12) cn-north-1 : China (Beijing)
13) cn-northwest-1 : China (Ningxia)
14) us-east-2 : US East (Ohio)
15) ca-central-1 : Canada (Central)
16) eu-west-2 : EU (London)
17) eu-west-3 : EU (Paris)
(default is 3): 1
Application HelloWorld has been created.
mshaik@noc:~/HelloWorld$ ls -l
total 0
mshaik@noc:~/HelloWorld$ echo “Hello World” > index.html
mshaik@noc:~/HelloWorld$ eb create dev-env
Creating application version archive “app-180307_094214”.
Uploading HelloWorld/app-180307_094214.zip to S3. This may take a while.
Upload Complete.
Environment details for: dev-env
Application name: HelloWorld
Region: us-east-1
Deployed Version: app-180307_094214
Environment ID: e-fsyyqsh22x
Platform: arn:aws:elasticbeanstalk:us-east-1::platform/PHP 7.1 running on 64bit Amazon Linux/2.6.5
Tier: WebServer-Standard-1.0
CNAME: UNKNOWN
Updated: 2018-03-07 04:12:26.059000+00:00
Printing Status:
INFO: createEnvironment is starting.
INFO: Using elasticbeanstalk-us-east-1-536751915275 as Amazon S3 storage bucket for environment data.
INFO: Created security group named: sg-5fce6929
INFO: Created security group named: awseb-e-fsyyqsh22x-stack-AWSEBSecurityGroup-1OP8CMX0L5XGW
INFO: Created load balancer named: awseb-e-f-AWSEBLoa-NWLS9TV8D5GA
INFO: Created Auto Scaling launch configuration named: awseb-e-fsyyqsh22x-stack-AWSEBAutoScalingLaunchConfiguration-1FTJ4C2WHJFDA
— Events — (safe to Ctrl+C)

mshaik@noc:~/HelloWorld$ eb open


mshaik@noc:~/HelloWorld$ cat .elasticbeanstalk/config.yml
branch-defaults:
default:
environment: dev-env
group_suffix: null
global:
application_name: HelloWorld
branch: null
default_ec2_keyname: null
default_platform: PHP
default_region: us-east-1
include_git_submodules: true
instance_profile: null
platform_name: null
platform_version: null
profile: null
repository: null
sc: null
workspace_type: Application
mshaik@noc:~/HelloWorld$ cat .gitignore
# Elastic Beanstalk Files
.elasticbeanstalk/*
!.elasticbeanstalk/*.cfg.yml
!.elasticbeanstalk/*.global.yml
