← All articles
AWS · 4 min read · 02 Dec 2018
Cloud Dev Setup on Ubuntu
A copy-paste setup guide for a full cloud dev environment on Ubuntu, editor, IaC, Python, AWS SDK, git, and the Serverless Framework.
Photo by Bernd Dittrich on Unsplash
Setting up a new machine for cloud work means the same handful of tools every time. Here's the whole setup, one piece at a time.
Visual Studio Code
- Download the Linux 64-bit
.debfile from the official VS Code docs - Open a terminal and go to your Downloads folder:
cd Downloads/ - Install it:
sudo dpkg -i code_1.28.2–1539735992_amd64.deb - Launch it from the system search and add the extensions you want (Python, C/C++, C# are good starting points)
Terraform
- Download the Linux 64-bit build from terraform.io/downloads.html
- Go to your Downloads folder
- Unzip it:
unzip terraform_0.11.xx_linux_amd64.zip - Move the binary onto your path:
sudo mv terraform /usr/local/bin - Confirm it worked by just running
terraform
GitHub
- Install git:
sudo apt-get -y install git - Set your identity:
git config --global user.name "your github username"git config --global user.email "your github email address"
- You're ready to clone and commit
Serverless Framework
- Install curl:
sudo apt-get install curl - Download Node.js:
curl -sL https://deb.nodesource.com/setup_11.x | sudo -E bash – - Install Node.js:
sudo apt-get install -y nodejs - Update the system:
sudo apt-get update && sudo apt-get upgrade - Install build tools:
sudo apt-get install -y build-essential - Install the framework:
sudo npm install -g serverless
Python
Ubuntu usually ships with 2.7.12 and 3.5.2 already installed. To get 3.6:
- Add the repo:
sudo add-apt-repository ppa:jonathonf/python-3.6 - Update and install:
sudo apt-get update && sudo apt-get install python3.6 - Confirm with:
python3.6
Boto3
The AWS SDK for Python.
- Install pip:
sudo apt-get install python-pip python-dev build-essential - Install boto3:
pip install boto3
Jupyter Notebooks
- Install it:
sudo python3 –m pip install jupyter - Start one:
jupyter notebook - It opens a local page in your browser where you can write and run code, equations, and notes side by side
That's the whole stack: editor, IaC, runtime, SDK, version control, and a serverless deploy tool, all from a clean Ubuntu install.
Practical guide: if you want to try this yourself
- Download the VS Code Linux 64-bit
.debfrom the official docs and install it withsudo dpkg -i code_1.28.2–1539735992_amd64.deb, then launch it and add the extensions you want (Python, C/C++, C# are good starting points). - For Terraform, grab the Linux 64-bit build from terraform.io/downloads.html, unzip it (
unzip terraform_0.11.xx_linux_amd64.zip), and move the binary onto your path withsudo mv terraform /usr/local/bin; confirm it worked by runningterraform. - Install git with
sudo apt-get -y install git, then set your identity:git config --global user.name "your github username"andgit config --global user.email "your github email address". - Node.js, needed for the Serverless Framework: install curl (
sudo apt-get install curl), add the NodeSource repo (curl -sL https://deb.nodesource.com/setup_11.x | sudo -E bash –), then install it withsudo apt-get install -y nodejs. - Update the system and pull in build tooling:
sudo apt-get update && sudo apt-get upgrade, thensudo apt-get install -y build-essential. - Install the Serverless Framework itself, globally:
sudo npm install -g serverless. - Python 3.6 needs a separate repo since Ubuntu ships older versions by default. Add it with
sudo add-apt-repository ppa:jonathonf/python-3.6, thensudo apt-get update && sudo apt-get install python3.6, and confirm withpython3.6. - Boto3, the AWS SDK for Python: install pip (
sudo apt-get install python-pip python-dev build-essential) and then the SDK itself withpip install boto3. - Last, install Jupyter Notebooks with
sudo python3 –m pip install jupyterand start one withjupyter notebook; it opens a local browser page for running code, equations, and notes side by side.
References
〜