In this section you will build your local development environment as well as the IBM Cloud infrastructure for deploying your application.
You will start by creating an IBM Cloud account and requesting an instance of a free trial Kubernetes cluster.
Later you will create a Github account and configure your local git
client.
The next steps involve the installation of several software development tools such as ibmcloud
CLI, Docker, Kubernetes and Visual Studio Code, that will assist you in your journey towards your first cloud-based Python application.
- Log in to IBM Cloud.
- Note: If you do not have an account, Create an IBM Cloud account using your email address.
- Click Create resource + in the top right.
- Open the Services menu on the left, then select the Containers category and click the Kubernetes Service card.
- In the Kubernetes Cluster page, select the Free plan and default resource group.
- Name your cluster as
username
-cluster and click Create. - In the Overview tab on the left, watch as your cluster is deployed. It may take up to 30 minutes until the Normal status is reached.
-
Log in to GitHub.
- Note: If you do not have an account, Sign up for free using your email address.
-
Update your profile page.
-
Install a Git client
- macOS: Download GitHub Desktop Client or
brew cask install github
. - Windows: Download GitHub Desktop Client.
- Fedora:
sudo dnf install git
.
- macOS: Download GitHub Desktop Client or
-
(macOS and Windows): Follow the instructions and setup GitHub Desktop.
- Note to Windows users: In case Firefox cannot handle the operation, copy and paste the URL into a different browser.
-
Define your Git identification credentials according to your profile page.
-
macOS and Windows: Under Preferences / Options, go to the Git tab and fill in your Name and Email address.
-
Fedora: Open a terminal and enter
git config --global user.name "Your Name" git config --global user.email "[email protected]"
-
-
(macOS) Click the GitHub Desktop menu and select Install Command Line Tool....
-
Follow these instructions to generate an SSH key.
-
Add the SSH key to your GitHub profile according to the instructions.
- Go to the IBM Cloud CLI download page.
- Choose the install command according to your operational system and follow the instructions.
- Note to macOS users: You can also do
brew cask install ibm-cloud-cli
. - Note to Windows users: A reboot may be required after installing IBM Cloud CLI.
- Note to macOS users: You can also do
- Install IBM Cloud CLI plugins.
- IBM Cloud Developer Tools:
ibmcloud plugin install dev
. - IBM Cloud Container Service:
ibmcloud plugin install kubernetes-service
. - IBM Cloud Container Registry:
ibmcloud plugin install container-registry
.
- IBM Cloud Developer Tools:
- In a terminal window, enter
ibmcloud --version
to check the installation. - In a terminal window, enter
ibmcloud plugin list
to check the plugins.
- Go to the Docker Store and follow the instructions according to your operational system
- Fedora: Get Docker CE for Fedora.
- Windows: Install Docker Desktop for Windows.
- macOS: Install Docker Desktop for Mac or
brew cask install docker
.
- (Windows) Virtualisation must be enabled in the BIOS. Go to Security, then Virtualization and enable both.
- In a terminal window, enter
docker --version
to check the installation.
- Go to the Install and Set Up
kubectl
page and follow the instructions appropriate to your operational system.- Note to macOS users: You can also do
brew install kubernetes-cli
. - Note to Fedora users: You can also do
sudo dnf install kubernetes
. - Note to Windows users: To add the folder containing
kubectl.exe
to the systemPATH
, follow these command-line or graphical interface instructions.
- Note to macOS users: You can also do
- In a terminal window, enter
kubectl version
to check the installation.
- Go to Visual Studio Code download page.
- Choose the installer according to your operational system and follow the instructions.
- Note to macOS users: You can also do
brew cask install visual-studio-code
. - Note to Fedora users: You can find detailed instructions here.
- Note to macOS users: You can also do
- Open VS Code and install extensions
- Python: click "Install" or hit
Ctrl + P
and enterext install ms-python.python
. - IBM Developer Tools: click "Install" or hit
Ctrl + P
and enterext install IBM.ibm-developer
. - Output Colorizer: click "Install" or hit
Ctrl + P
and enterext install IBM.output-colorizer
. - Docker: click "Install" or hit
Ctrl + P
and enterext install PeterJausovec.vscode-docker
. - Kubernetes: click "Install" or hit
Ctrl + P
and enterext install ms-kubernetes-tools.vscode-kubernetes-tools
.
- Python: click "Install" or hit