## Wrapup ### Why this class * "General Knowledge" about cloud computing, docker, etc. * "Pointers" to look at if you need them later * "First experience" in manipulating very useful tools * Mindset of "cloud computing" ### Challenges 🧰 class about tooling ... 💡 it will make sense ... 🔮 six months from now ! ### Why doesn't it work every time That's the cloud for you: It depends on your environment, the network etc. We try to abstract it with "remote development" (think codespaces) It's all very new : two years ago, codespaces didn't exist ! Remember the IT matrix from hell ?  The 🔥 **ISAE HYPERCUBE FROM HELL** 🔥 Consider the following variables: * in class or at home * laptop OS: Windows 10, Linux, MacOS, WSL for Linux, Linux VM * web browser: Chrome, Firefox, Safari, with more or less adblocks etc. * wi-fi network: Own 4G, own network, ISAE-EDU, eduroam * Google Cloud SDK installed: yes, no * proficiency with CLI/Terminal: high, medium, low Compute the number of combinations. It's > to the number of students That's real life...  If you had to remember only one thing  ### Take-away for Cloud Computing       Cloud, technical evolution, usage revolution  ### Take-away for Remote Development Environment ### Key use case  https://newsletter.pragmaticengineer.com/p/cloud-development-environments-why-now #### Remote Development : Your future daily routine  [Uber Blog describing their way of working](https://www.uber.com/en-FR/blog/devpod-improving-developer-productivity-at-uber/) #### [Github Codespaces](https://docs.github.com/en/codespaces/overview)  * [Github Codespaces](https://docs.github.com/en/codespaces) : A managed development environment by Microsoft Azure * A virtual machine and a [containerized development environment](https://docs.github.com/en/codespaces/setting-up-your-project-for-codespaces/adding-a-dev-container-configuration/introduction-to-dev-containers) * A lot of built-in bonuses including "in-browser" connection & TCP port forwarding with reverse proxy  ### Take-away for GCP
[GCP Services in 4 words or less](https://googlecloudcheatsheet.withgoogle.com/) #### An example workflow for your future routine  #### SSH Tunnel, Port Forwarding > In computer networking, **a port is a communication endpoint**. At the software level, within an operating system, a port is a logical construct that identifies a specific process or a type of network service. **A port is identified for each transport protocol and address combination** by a 16-bit unsigned number, known as the port number. The most common transport protocols that use port numbers are the Transmission Control Protocol (TCP) and the User Datagram Protocol (UDP). [Wikipedia](https://en.wikipedia.org/wiki/Port_(computer_networking)) #### Examples of protocols & usual ports Examples * SSH on port 22 * HTTP on port 80 * HTTPS on port 443 http apps can serve content over specific ports Example * Jupyter default is 8888 (that's why you open http://localhost:8888) #### SSH Tunnels We usually connect to web app using `http://{ip}:{port}` 😨 but what if the machine is not connected to the internet ? ➡️ Enter SSH with port forwarding  [Visual guide](https://iximiuz.com/en/posts/ssh-tunnels/) #### Tunnels of tunnels * Some of you did Local Machine -> (browser) -> Codespace -> (ssh) -> VM -> Jupyterlab on port 8888 * With port transfers ! * What happens when you go to `http://(url-generated-by-codespaces):8888` in this case ?  ### Take-away for Containers  [Docker](https://www.docker.com/)      workflow  dockerfile / layer / image / container  containers is not magic  containers for data science  more about docker * Containers really shine when you are deploying multi-containers applications - [This tutorial on microservices w/ Compose](https://training.play-with-docker.com/microservice-orchestration/) * Containers really shine when you are in a cluster world - [Docker swarm](https://training.play-with-docker.com/swarm-stack-intro/) * Orchestration & Scheduling - [Read this excellent Kubernetes comic !](https://cloud.google.com/kubernetes-engine/kubernetes-comic/) what's next ?  ### BE : Why ?  ### BE : Where the f*** am I ?  [docker port forwarding](https://iximiuz.com/en/posts/docker-publish-container-ports/) ### Take-away for Deployment & Orchestration - You can use docker to package & a ML model - Usually we make "webapps" that communicate through "rest APIs" - [streamlit](https://streamlit.io) may be very useful later in your life Orchestration is the "management" part of Containers It tries to answer the following questions * How do I **deploy my container** ? * How do I **put the right containers at the right spot** ? * How do I **scale (up and down) to demand** ? * How do I **expose the http endpoints** ? * How do I **manage failure of containers** ? * How do I **update my model without downtime** ? Kubernetes is **one** of the solutions (the hardest) available to you Read this [comic](https://cloud.google.com/kubernetes-engine/kubernetes-comic/) Learn more on the Data Distribution class ! Should you learn kubernetes ? https://huyenchip.com/2021/09/13/data-science-infrastructure.html ## The End 