Ansible Ready Workspaces ATL Slide Decks/Ansible … · Something as Code … ;) Infrastructure as...

24
Ansible Ready Workspaces Sun Tan - Senior Software Engineer - Eclipse Che Victor Da Costa - Principal Specialist Solution Architect

Transcript of Ansible Ready Workspaces ATL Slide Decks/Ansible … · Something as Code … ;) Infrastructure as...

Page 1: Ansible Ready Workspaces ATL Slide Decks/Ansible … · Something as Code … ;) Infrastructure as Code.--.:: ... Eclipse Che project Red Hat Linux and Application Infrastructure

Ansible Ready WorkspacesSun Tan - Senior Software Engineer - Eclipse CheVictor Da Costa - Principal Specialist Solution Architect

Page 2: Ansible Ready Workspaces ATL Slide Decks/Ansible … · Something as Code … ;) Infrastructure as Code.--.:: ... Eclipse Che project Red Hat Linux and Application Infrastructure

Victor da CostaSolution Architect - EMEA

Principal Specialist Solution Architect@ Red Hat

Ansible by Red Hat

Twitter/@victorobotzGithub/@victorock

2

About me...

Page 3: Ansible Ready Workspaces ATL Slide Decks/Ansible … · Something as Code … ;) Infrastructure as Code.--.:: ... Eclipse Che project Red Hat Linux and Application Infrastructure

Victor da Costa

1. I've started with Ansible to automate installation and deployment of Software Defined Storage.

2. I've been using Ansible for two and half years.

3. My favorite thing to do with Ansible is Network Automation.

Page 4: Ansible Ready Workspaces ATL Slide Decks/Ansible … · Something as Code … ;) Infrastructure as Code.--.:: ... Eclipse Che project Red Hat Linux and Application Infrastructure

Sun TanDeveloper

Senior Software Engineer@ Red Hat

Eclipse Che - CodeReady Workspaces

Paris JUG leader

@__sunix_4

About me...

Page 5: Ansible Ready Workspaces ATL Slide Decks/Ansible … · Something as Code … ;) Infrastructure as Code.--.:: ... Eclipse Che project Red Hat Linux and Application Infrastructure

Sun Tan1. How did you get started with Ansible?2. How long have you been using it?

4 years ago, worked with Amadeus for an travel agency and deployment of their apps was done … manually … following a README file. Deployment was taking a least 1 hour and usually failed because of human errors.

With ansible we drop that to 10 minutes and without failures.

3. What's your favorite thing to do when you Ansible?Something as Code … ;)

Page 6: Ansible Ready Workspaces ATL Slide Decks/Ansible … · Something as Code … ;) Infrastructure as Code.--.:: ... Eclipse Che project Red Hat Linux and Application Infrastructure

Infrastructure as Code

.--.

::\`--._,'.::.`._.--'/::::

::::. ` __::__ ' .::::::

::::::-:.`'..`'.:-::::::::

::::::::\ `--' /::::::::::

USE THE SOURCE LUKE …

Page 7: Ansible Ready Workspaces ATL Slide Decks/Ansible … · Something as Code … ;) Infrastructure as Code.--.:: ... Eclipse Che project Red Hat Linux and Application Infrastructure

Infrastructure as Code

● Reuse the developer best paradigm:

○ Travel in time with Git

○ Reproducible

○ Faster

○ Tools enabler

○ Failure free

Page 8: Ansible Ready Workspaces ATL Slide Decks/Ansible … · Something as Code … ;) Infrastructure as Code.--.:: ... Eclipse Che project Red Hat Linux and Application Infrastructure

Developer Environment …… as Code ?

Page 9: Ansible Ready Workspaces ATL Slide Decks/Ansible … · Something as Code … ;) Infrastructure as Code.--.:: ... Eclipse Che project Red Hat Linux and Application Infrastructure

Imagine … Developer Environment as Code

● Reuse the developer best paradigm:

○ Travel in time with Git

○ Reproducible

○ Faster

○ Tools enabler

○ Failure free

Page 10: Ansible Ready Workspaces ATL Slide Decks/Ansible … · Something as Code … ;) Infrastructure as Code.--.:: ... Eclipse Che project Red Hat Linux and Application Infrastructure

DEVOPS QUOTES IN THE ENTERPRISE TODAY

DEVOPS PRODUCTIVITY TODAY

Sorry guys, it works on my machine. You should have done something wrong setuping your environment.

PaulLinux System Administrator

“” It takes days to setup my environment and make it works properly. I still have to integrate with CI systems… What’ s CI BTW?

JoeNew hired Network Operator

“” Can you explain me the commands to build, run and test my playbook. Btw, How do i save files in vi?

JackWindows System Administrator

“”

Page 11: Ansible Ready Workspaces ATL Slide Decks/Ansible … · Something as Code … ;) Infrastructure as Code.--.:: ... Eclipse Che project Red Hat Linux and Application Infrastructure

A kubenative IDE Running on Kubernetes

Web UI for coding

IDE running server side with Rest API

On demand developer environment

WHAT IS ECLIPSE CHE ?

Page 12: Ansible Ready Workspaces ATL Slide Decks/Ansible … · Something as Code … ;) Infrastructure as Code.--.:: ... Eclipse Che project Red Hat Linux and Application Infrastructure

WHAT IS ECLIPSE CHE ?

Page 13: Ansible Ready Workspaces ATL Slide Decks/Ansible … · Something as Code … ;) Infrastructure as Code.--.:: ... Eclipse Che project Red Hat Linux and Application Infrastructure

CodeReady Workspaces

Container Workspaces

Workspace replicas to end “works on my machine” and enable team collaboration.

The collaborative OpenShift-Native IDE. Free for any customer of OpenShift Dedicated or OpenShift Container Platform.

Based on the open Eclipse Che project

Red Hat Linux and Application Infrastructure

Plugin model for extensibility

Serverless support(coming later)

DevOps Integrations

Reference developer workspaces from any issue, failed build, or git notification.

Protect Source Code

Full access to source code without any of it landing on hard-to-secure laptops.

Use It To: Replace VDI for devs, and enable true container-based DevOps.

CodeReady Workspaces

Page 14: Ansible Ready Workspaces ATL Slide Decks/Ansible … · Something as Code … ;) Infrastructure as Code.--.:: ... Eclipse Che project Red Hat Linux and Application Infrastructure

Codified developer tooling configuration, can easily be

modified, shared, forked, extended.

Live with the source code and follow the same lifecycle

Don’t mess with hard to maintain and hard to manage

documentations, VMs, Dockerfiles which provide only a partial

solution on setuping the developer environment.

Ability to very easily switch developer context

Devfile: Developer environment as Code

> ……………………………………………………………………………………………………....……………………………………………………………………………....……………………………………………………………………………....……………………………………………………………………………....……………………………………………………………………………....……………………………………………………………………………....……………………………………………………………………………....……………………………………………………………………………....……………………………………………………………………………....…

DEVFILE………………………………....……………………………………………………………………………....……………………………………………………………………………....……………………………………………………………………………....……………………………………………………………………………....……………………………………………………………………………....……………………………………………………………………………....……………………………………………………………………………....……………………………………………………………………………....……………………………………………………………………………....……………………………………………………………………………....……………………………………………………………………………....

Devfile

Page 15: Ansible Ready Workspaces ATL Slide Decks/Ansible … · Something as Code … ;) Infrastructure as Code.--.:: ... Eclipse Che project Red Hat Linux and Application Infrastructure

https://che.openshift.io/f?url=https://github.com/sunix/che-ansible

or http://bit.ly/cheansible

Ansible Ready Workspaces:Walkthrough

Page 16: Ansible Ready Workspaces ATL Slide Decks/Ansible … · Something as Code … ;) Infrastructure as Code.--.:: ... Eclipse Che project Red Hat Linux and Application Infrastructure

Ansible Ready Workspaces:Behind the Scenes

Page 17: Ansible Ready Workspaces ATL Slide Decks/Ansible … · Something as Code … ;) Infrastructure as Code.--.:: ... Eclipse Che project Red Hat Linux and Application Infrastructure

Ansible Ready Workspaces:Behind the Scenes

Page 18: Ansible Ready Workspaces ATL Slide Decks/Ansible … · Something as Code … ;) Infrastructure as Code.--.:: ... Eclipse Che project Red Hat Linux and Application Infrastructure

Visual Studio Code ExtensionsExtremely popular pluginsOur first extension, Language Support for Java™ by Red Hat, was published in Sept. 2016 as an experiment.

Over 50 releases later, it’s been downloaded nearly 16 million times by over 2.5 Million developers!

More coming soonWe’ve been adding more extensions to help developers using VS Code have a fantastic experience when coding in Java, XML, Yaml, etc., or when working with OpenShift or other technologies where Red Hat is the expert.

VSCode extensions

Page 19: Ansible Ready Workspaces ATL Slide Decks/Ansible … · Something as Code … ;) Infrastructure as Code.--.:: ... Eclipse Che project Red Hat Linux and Application Infrastructure

● Auto completion from Ansible doc.● Auto completion for variables.● Code snippets.● Syntax highlighting.● Yaml validation.● Hover over module names, to show module

documentation.● Run playbook from Docker.● Run playbook from local Ansible installation.● Run playbook from Cloud Shell.● Run playbook remotely via ssh.● Auto File Copy to remote host on saving.

VSCode Ansible Extension

Reference: https://marketplace.visualstudio.com/items?itemName=vscoss.vscode-ansible

VSCode Ansible extension

Page 20: Ansible Ready Workspaces ATL Slide Decks/Ansible … · Something as Code … ;) Infrastructure as Code.--.:: ... Eclipse Che project Red Hat Linux and Application Infrastructure

VSCode Extensions in CheContainerizing the IDE: zero install and automate configurationExtended Eclipse Theia, to provide a VSCode-like experience

Built-in:⌁ Languages Server Protocol⌁ Debug Adapter Protocol

Compatible withVSCode extensions

VSCode extension in Che

Page 21: Ansible Ready Workspaces ATL Slide Decks/Ansible … · Something as Code … ;) Infrastructure as Code.--.:: ... Eclipse Che project Red Hat Linux and Application Infrastructure

Che plugin =

VSCode extension+

Sidecar container

Page 22: Ansible Ready Workspaces ATL Slide Decks/Ansible … · Something as Code … ;) Infrastructure as Code.--.:: ... Eclipse Che project Red Hat Linux and Application Infrastructure

Dockerfile (sidecar container):● https://github.com/victorock/che-remote-plugin-ansible

DevFile:● https://github.com/sunix/che-ansible

VSCode Ansible:● https://marketplace.visualstudio.com/items?itemName=vscoss.vscode-ansi

ble

Links

Links

Page 23: Ansible Ready Workspaces ATL Slide Decks/Ansible … · Something as Code … ;) Infrastructure as Code.--.:: ... Eclipse Che project Red Hat Linux and Application Infrastructure

Sun: Why I ❤ Che 7

I ❤ CHE 7

ShareMy project development environment is stored in a tiny `devfile.yaml`. I can push that file into a Git repo. Share that file with my team mates or ... anyone.

Write Once, Code anywhereI can regenerate a new dev environment anywhere I have a kubernetes instance. It is so cheap that I generate a workspace environment everytime I start to work on a new task. Switching from one task to another is about switching from a workspace to another.

Just need Openshift ...I don't have to install Ansible or any dependencies on my laptop. They all run inside containers I can access to run my build or test my native apps.

VSCode compatibilityChe7 is a very complete IDE as we support the VSCode extensions but they runs on sidecar containers :).

sudo rm -rf /Dropping everything is very fine. I can make my OS upgrade safely. I would even survive to a `sudo rm -rf /`.

Try new technologiesI am not afraid to break my environment as I can regenerate it anytime. I can freely test new plugins, try the latest version Ansible.

Page 24: Ansible Ready Workspaces ATL Slide Decks/Ansible … · Something as Code … ;) Infrastructure as Code.--.:: ... Eclipse Che project Red Hat Linux and Application Infrastructure