# How I understand the cloud
<!-- .slide: data-background-image="https://i.imgur.com/pXwGDNn.jpg" -->
----
slide: https://hackmd.io/@petrkotas/cnmu17
---
## Who am I?
- Cloud enthusiast
- Founder of cloudnative.cz
- Senior engineer @Red Hat / Virtualization
- I use spaces
---
## My path to the Cloud
----
### Took longer that you would suspect
----
### e-shop in PHP
* good old FTP <!-- .element: class="fragment" data-fragment-index="1" -->
* start the service on the server <!-- .element: class="fragment" data-fragment-index="2" -->
* everything by hand <!-- .element: class="fragment" data-fragment-index="3" -->
----
### distributed algorithms on supercomputer
* first "close-to" cloud encounter <!-- .element: class="fragment" data-fragment-index="1" -->
* distributed programs runs on the cluster connected with the MPI <!-- .element: class="fragment" data-fragment-index="2" -->
* the programs are executed by the scheduler <!-- .element: class="fragment" data-fragment-index="3" -->
* the supercomputer provided a framework to write the apps <!-- .element: class="fragment" data-fragment-index="4" -->
----
### distributed fulltext @Seznam
* distributed search <!-- .element: class="fragment" data-fragment-index="1" -->
* collaboration with admin team to deploy <!-- .element: class="fragment" data-fragment-index="2" -->
* not dynamic <!-- .element: class="fragment" data-fragment-index="3" -->
* all manual <!-- .element: class="fragment" data-fragment-index="4" -->
----

----
:::danger
**All done manually**
:::
----
### Own startup Cosidat
* fully benefit from the AWS
* containers and stuff
----
Breaking point for me to realize,
* I love the cloud
* I was working with cloud all the time
----
### Red Hat - virtualization/cloud
* virtualization on top of the Kubernetes
* tooling around Kubernetes
----
:::warning
**TIP 1:** Cloud is the state of the mind.
:::
----
It is share the state of the mind, why we started
**Cloud Native Czechia**
----
It is the state of the mind,
I will try to share in this talk.
---
## So what is cloud
----
### Cloud is a mess
----

----
<span>Where to start?<!-- .element: class="fragment" data-fragment-index="1" --></span>
<span>How to start?<!-- .element: class="fragment" data-fragment-index="2" --></span>
---
### Level of involvedness
----

----
### IAAS
----

----
* simplest way to the cloud<!-- .element: class="fragment" data-fragment-index="1" -->
* use the cloud as fancy VPS<!-- .element: class="fragment" data-fragment-index="2" -->
* move existing app to the cloud<!-- .element: class="fragment" data-fragment-index="3" -->
----
#### The tuning utility for fulltext
* python webpage <!-- .element: class="fragment" data-fragment-index="1" -->
* compute differences from the search queries <!-- .element: class="fragment" data-fragment-index="2" -->
* stores the users and authenticates them <!-- .element: class="fragment" data-fragment-index="3" -->
* configuration is passed from the install package <!-- .element: class="fragment" data-fragment-index="4" -->
* dependencies install as package dependencies <!-- .element: class="fragment" data-fragment-index="5" -->
* it relies on system wide packages <!-- .element: class="fragment" data-fragment-index="6" -->
----
So what is the benefit over the normal VPS?
----
You can automate the infrastructure via API
and for instance [terraform](https://www.terraform.io/).
----
:::warning
**TIP 2:** Automate your infrastructure.
:::
----
Am I cloud-native yet?
----
**No**, you just run in the cloud.
----
#### Sprinkle some containers on top
----
Containerize the search tuner
----
* read configuration from environment <!-- .element: class="fragment" data-fragment-index="1" -->
* compute differences in different process <!-- .element: class="fragment" data-fragment-index="2" -->
* store data to mounted volume <!-- .element: class="fragment" data-fragment-index="3" -->
* database go out <!-- .element: class="fragment" data-fragment-index="4" -->
----
So we are in the container.
Update infra scripts and go.
----
Am I cloud-native yet?
----
**No**, you are still not benefiting from the cloud.
Barely using it.
----
You can do better, save some more work.
----
:::warning
**TIP 3:** Automate your workflow and deployment
:::
----
* Cover you app with tests to play it safe <!-- .element: class="fragment" data-fragment-index="1" -->
* Deploy only for part of the users <!-- .element: class="fragment" data-fragment-index="2" -->
* Deploy as often as you can <!-- .element: class="fragment" data-fragment-index="3" -->
* Be ready to roll back <!-- .element: class="fragment" data-fragment-index="4" -->
----
While we are developing the app.
----
:::warning
**TIP 4:** Cloud is rich for services and components you can use.
:::
----
On top of building blocks, cloud offers a plethora of services ready to use.
----
Services, like azure ML are
* libraries on steroids
* offer expert knowledge
----
For the search tuner,
* use hosted DB
* use object store
----
Am I cloud-native yet?
----
**Technically**, using the power of the cloud and automation.
But it can be better.
----
:::info
Cloud is a mix of building blocks, services and best practices. Which all can be used via API.
:::
---
### PAAS
----
The search tuner is still little static.
----

----
It would be better if it reacted to the user load.
----
We can switch from pure infrastructure to the managed container platform.
* [Azure container instances](https://azure.microsoft.com/en-us/services/container-instances/)
* [Amazon Fargate](https://aws.amazon.com/fargate/)
----
To enable auto-scaling, update the app to be:
* stateless - dump the state outside (Redis)
* pass the state along so any instance can continue the work
----
Enable auto-scaling and profit.
----
:::warning
**TIP 5:** Be careful, you pay for everything in cloud.
:::
---
## How does Kubernetes fit in
----

----
Offered on all major cloud providers.
----
#### CNCF addons
----

----
In theory build the same platform everywhere.
----
## Wrap up
- Cloud is a state of the mind
- Automate your infrastructure
- Automate workflow and deployment
- Use existing services, don't reinvent the wheel
- Be careful, you pay for everything
---
## Thank you for your attention! :heart:
You can find me on
- cloudnative.cz
- github.com/petrkotas
- twitter.com/petrkotas
- linkedin.com/in/petrkotas
{"metaMigratedAt":"2023-06-15T01:13:56.224Z","metaMigratedFrom":"YAML","title":"How I understand the cloud","breaks":true,"description":"My personal view on the cloud technologies.","slideOptions":"{\"transition\":\"slide\",\"allottedMinutes\":30}","contributors":"[{\"id\":\"85405ad0-f67a-4d54-838e-4a8fb0f25dd2\",\"add\":9149,\"del\":2158}]"}