Model a Container Runtime environment on Your Mac with VMware AppCatalyst DevOps @ VMworld Fabio Rapposelli - @fabiorapposelli
VMware AppCatalyst Datacenter-in-a-laptop, model production deployments on your laptop Same battle-tested virtualization engine as Fusion and Workstation Drop-in replacement for Virtualbox in Docker Machine and Vagrant Runs Linux, Solaris and BSD VMs Developer-Friendly Optimized to support developer workflows Exposes REST API with command-line interface No UI to mess with, built to run fast and mean Technology Preview 2 out today!: http://getappcatalyst.com
Network and Storage Abstractions (coming soon) VMware AppCatalyst Developer Desktop VMware AppCatalyst CLI REST API Network and Storage Abstractions (coming soon) Docker Machine Container Vagrant Bring your own Linux Your own integration!
Ongoing vSphere optimization & integrations VMware managed system & security updates Broadest support for container ecosystem 2 minutes Reference platform for delivering optimal vSphere container experience Open-Source Linux Container Host CONFIDENTIAL
Creating Trust with PhotonOS 2nd Platform Environments 3rd Platform Environments Package-level management Atomic image management rpm-ostree dnf/yum compatible with familiar operations TRUST tdnf Image based Rewritten in C++ Central compose server Package level dependency and version management Versioning of the OS image CONFIDENTIAL
Install AppCatalyst CONFIDENTIAL
Install AppCatalyst (DMG or Homebrew) # If you don't have Caskroom installed brew install caskroom/cask/brew-cask # Install AppCatalyst through Homebrew brew cask install vmware-appcatalyst # (Won't someone please think of the bandwidth!) Or…
What is Docker? Docker is an open platform for developers and sysadmins to build, ship, and run distributed applications. Docker enables apps to be quickly assembled from components and eliminates the friction between development, QA, and production environments Works on Linux only Extensive library of pre-built containers (Docker Hub) Container is lighter than a VM CONFIDENTIAL
What is Docker Machine? Machine lets you create Docker hosts on your computer, on cloud providers, and inside your own data center. It creates servers, installs Docker on them, then configures the Docker client to talk to them. The evolution of Boot2Docker Works with lots of compute providers Single static binary, no dependencies CONFIDENTIAL
Install Docker & Docker Machine CONFIDENTIAL
Install Docker & Machine # Download docker and docker-machine https://github.com/cloudnativeapps/machine/releases/tag/vmw_appcatalyst_v0.1 https://github.com/docker/docker/releases/tag/v1.8.1
Run our first Docker Container CONFIDENTIAL
Create Docker Environment & Start Wordpress # Create a new Docker host on AppCatalyst docker-machine create -d vmwareappcatalyst docker-host-1 # Read the Environment variables docker-machine env docker-host-1 # Test communication docker version # Run Wordpress container docker run -p 80:80 -d tutum/wordpress # Get IP of the Docker Host docker-machine ip docker-host-1
What is Vagrant? Vagrant provides easy to configure, reproducible, and portable work environments built on top of industry-standard technology and controlled by a single consistent workflow Works with multiple target (providers) Can use multiple provisioners (Puppet, Salt, Ansible…) Tightly integrated with Docker CONFIDENTIAL
Vagrant Core Concept: Vagrantfile Vagrant.configure(2) do |config| # Every Vagrant development environment requires a box. # You can search boxes at https://atlas.hashicorp.com/search config.vm.box = "vmware/photon" # Configure our boxes with 1 CPU and 384MB of RAM config.vm.provider 'vmware_appcatalyst' do |v| v.cpus = '1' v.memory = '384' end # Set up an additional shared folder. config.vm.synced_folder('/Users/frapposelli/Development', '/development') # Enable provisioning with a shell script. config.vm.provision "shell", inline: <<-SHELL tdnf install -y vim SHELL It’s a Ruby file that describes the environment we want to build with Vagrant Two Major sections: Provider Configuration Machine Provisioning configuration CONFIDENTIAL
The Vagrant Workflow Box Repository Hashicorp Atlas AppCatalyst # VM1 VM2 AppCatalyst Application Code / Scripts Application Code / Scripts # git clone vagrant up --provider=vmware_appcatalyst vagrant destroy vagrant ssh VM1 Vagrantfile Vagrantfile Local Workstation Git Repository Development Workspace
Install Vagrant CONFIDENTIAL
Install Vagrant Or… # If you don't have Caskroom installed brew install caskroom/cask/brew-cask # Install Vagrant through Homebrew brew cask install vagrant # (Won't someone please think of the bandwidth!) Or… CONFIDENTIAL
Install additional Vagrant Plugins and Box # Install Vagrant Plugins vagrant plugin install vagrant-vmware-appcatalyst vagrant plugin install vagrant-guests-photon # Install Vagrant box for Photon vagrant box add vmware/photon
Run our first Vagrantfile CONFIDENTIAL
Thank You! @fabiorapposelli – github.com/frapposelli