 Yeah, okay so this talk is about How to use recurrent to simplify development environments if you can use and if you can consume an open stack environment So we simply first start with a quick company over a few of my Employee I'm working for the beyond systems. We are a German linux consulting system house We are doing consulting support development training operations and solutions for big customer sites in Germany like SAP or IBM or And so on so every big company in Germany is a customer of us and by streaming training on and and so We have a lot of experience this this all of the several aspects and I am primarily working only with open stacks. I'm a cloud solution architect and We are partnering with also a lot of companies for example with my renters or his workspace So that we can provide our customers with solutions. They want to use and not with solutions We want to sell them. So we are not vendor driven. We are fully a customer dream so the focus of this talk is as a Sad way grant was open stack. I would start with a quick overview. What is way current? What can I do with way current? How can I use it on my? Local workstation with virtual box. So this is the default configuration of ray current and And then we'll switch over to how to use very current with open stack because this is the normal use case if you have open-stack cloud So way current is a tool to provide and to create reproduced reproducible and portable development environment. So you can simply Define and development environment in one configuration file called the ray current file And then you can share this way current file with your developers or with your operators or with the users and so on and It's really simple to to write those ray current files and to reuse those in development environments So the focus is if you have one local development environment, you can share it with everybody so you can integrate For example a UX designer in the development process because he the developer Gives you the box the developer designer can start the box and then he can work on the development environment without Having to install it and so on So this is really cool because if the UX designer can join the development process in the early stage We can remove all the UX bugs for example and you have not to wait for a final product and UX designer comes in and then he says It's all crap and removes everything and you have to start So you have a nice agile workflow you can import it So I can write the ray current file for example virtual box And then I can simply adapt it for an open stack environment But I have to simply there's the same calls on the CLI to start this development environment And I do not see if this environment is running on an open stack or a virtual box or on VM where and so on So this is also really cool because I'm not dependent of the virtualization platform So I can simply switch it and that's fine. I can unify my my environments For example, we have a customer site in Germany and they are using their They have an integration environment written in in vagrant with puppet open stack and They use the same environment for in vacant for integration tests and for the development like for the production environment And they can simply switch over from the production to the integration and so on and and can test everything and so on and Of course, it's reproducible So you have not the bare metal system under your desk like a normal developer will do it and You can simply destroy your development environment you can restart your development environment and then you have a new and fresh environment and You have not some strange packages on the system or manual hacks and so on so the common Faults you have in a normal normal development workflow will be removed with a grant So this is the default workflow you have recurrent on top recurrent is consuming virtualization platform for example virtual box and It will create some instance virtual machine and then you can use a provisional for example, Ansible Because I like Ansible so we use Ansible in this session, but you can also use on puppet or Chef or CF engine or something else So there are a lot of provision as you can use and you can mix them so you don't have to use Ansible and It will simply provide the virtual box and then it will run Ansible and you have a fresh and clean development environment Some nice facts about recurrent is that there are a lot of plugins. So you have a small core component driven by HashiCorp and a lot of stuff in Ruby gems because recurrent is fully written in Ruby so you can use the common Ruby gems and on the common Ruby workflows and There are a lot of prepared machine images like the glance images for open stack already available on on the vacant cloud today it's called atlas and There you can download Images and then you can start them on your local machine and for open stack You can simply use the new marketplace for example for the glance images As announced to do tomorrow in the keystone key sessions So yes, that's all about Nothing more important Installation is straightforward There are provided packages for the common line of distributions and For macOS and for for Windows So you know simply install it on your local machine and you need the virtual box as default and Then you can start working with recurrent recurrents checks for the newest version when you started because There are a lot of new features are coming in. So it's really important that you always use the latest version as I said, you have a recurrent file to specify the development environment and Recurrent files are simply Ruby files. So every recurrent file starts with this block and This way you will receive an configuration object and with this configuration object you can or should disable this and You can configure every aspect of the recurrent environment. So this is every environment will start with this this configuration block and We will simply Create another configuration object inside this recurrent configuration object To define our nodes. So every node configuration object inside this recurrent configuration object can be Used to define all of the aspects of the virtual machine so I can set The virtual resources for example, how many memory or how many CPUs should be used or the host name which provider should be used I can switch from open stack to virtual box for example So I can define a testing node that should be run on virtual box And if I change the provider for open stack for example, I can specify the parameters for open stack and Host name is optional by default. It's simply the same like testing So the host name is always the name of this configuration object, but I can change the host name then I I have to Specify my my base box. So this is simply like a glance image I have my distribution. I will pre-install it for example this packer and Packer will provide my base machine image and this base machine image can be downloaded And then it will be started with virtual box or this open stack Like it's at the moment the common workflow to provide a virtual machine on open stack. I Can search for these boxes on Atlas There are a lot of already prepared boxes for example Ubuntu has official record boxes that can be used and For example, we are providing base box for open SUSE There are also images for SUSE Linux Enterprise or Red Hat or CentOS and so on. So there are boxes available for all kind of distribution And it should be also possible to use Windows for example with this record if you want to do this So you can simply add The box that should be used and If you start the record box and next step the box will be downloaded from Atlas And you have not to care about where to import this image But you can so you can manually download images you can manually add them And if you want to add them you simply use the CLI so record box add will add new images provided on the Atlas cloud and You can list available images simply with record box list and this way you can list all the usable images on this local machine and You can see you have different versions for example here for Ubuntu so you put you have a daily image or weekly image something like that so that you can simply always use the the newest image As default virtual box you can also switch to for example the Mware as a hypervisor or hyper V or Dockers also possible So this is only the set of integrated Provider in that virtual box and there are a lot of community provider like for open stack or for the rec space cloud Or for some other type of cloud So I think it's also possible to use the Google Engine for example So you simply have to choose the right plug in and then you can use different providers To bootstrap so we do not need more than those huge comments we had in the previous slide and then we can start the virtual machine with so we have Dispatch and file and we simply specified the host name and the box and then we can we can start the virtual instance on on the Local local system so this will start a you put to and in a few seconds you can look into the you put to and I can work on it like Yes on the local system, so that's all for to get started with this record so this is not really useful because now we have only have a single system and But we have not installed any software so normally you want to use a provisional To bootstrap the virtual system after the the start of the instance so you can add This is not really interesting here You can add support for several provisional like Ansible shell Skirt or Chef CF engine and so on and you can simply add them in the Inside the node contribution object and for example with this block. We will simply call an echo on this system and it will output hello recurrent and This way we can simply call any comment on the low error mood system or we can add Ansible Ansible playbook file for example on the Hypervisor system and it will be copied to the virtual system and we can start it on the virtual system So this is our empty instance. We can simply log in with a very grand SSA H and we do not have to care about IP addresses and so on This will all be managed by recurrent. So we have simply a local IP address like for KVM here and recurrent knows this address and can connect to this IP address so we simply add the provisional By uncommenting those Blocks and this way we will now first call echo on the system and after calling echo We will call the Ansible to run this playbook on the remote system and then we can Have a look in inside the playbook. We'll simply install an HTTP server will start this HTTP server and this is our development environment for example So this will take a few moments So we'll now have simply error now when when running Shell scripts on your Puntu to fix this You can simply change the used SSH The shell so we have to override the bash environment global environment So that we will not have this error in the output, but it's just in it So we have here the output from the echo comment on the remote system And at the moment Ansible provisional is running on the remote system So now we have installed the HTTP server and we started it So now we have a problem. We cannot exit it because we only have the local API address on on the system So the web server is running on this port But this port is only available on the local system and we want to access this Port on the remote system. So we have simply add a port forwarding from the Instance to the remote system to be able to join this port on the remote hypervisor system so we can simply add a Forward forwarded port and this way we can forward the guest port on port 80 to port 6000 for example on the hypervisor system and after this we can simply Join the web server on port 6000 and then we will forward port 6000 on port 80 on the development system And we do not have to care about How to access the web server on on which IP address is this running and so on because it's also possible to use multi machine environments for example and Then we can forward several ports on multi machines on this hypervisor system And then we can access all the services running on multi machines from the hypervisor system and as our problem is That you want to use Some files inside the virtual machine. So we install the web server But the web server has no no files to serve at the moment. So we can use a sync folders This is simply that we have for virtual box and the virtual box file system and the virtual virtual box file system driver will simply Share a file like this NFS. This is available on the hypervisor system And it will be copied inside the virtual system. So we can simply mount the Directory source to to the web server directory and this way we can share all the files available on the hypervisor system inside from the virtual system and can access it with the web server and This way you can simply build Development environments sharing for example a web page and you can install all the stuff in the virtual machine And then you can access the files provided inside the repository from inside the virtual system So for example the vagrant development environment is of course a vagrant file so that you have On github, so this is the vagrant source repository and to be able to test Changes inside this repository. You can simply start a vagrant environment with this vagrant file and this will install some Ruby stuff and will install the vagrant sources provided in this repository and and this way you have you can simply provide in development environment with your sources in one place and so everybody can test Contested and do not have to care about how to set up the stuff. You have not to provide an installation guide or how to Do some preparations to be able to run the software from source So you simply make a vagrant up inside the repository and then you have a fully working environment inside the virtual system and Of course, you can use all of the virtual box comments For example, you can add additional storage. You can add internal virtual box networks and So every feature from our virtual box can be used inside a vagrant. Okay so now we have vagrant and Yeah, we have to use virtual box. So maybe that's not so nice And other problem is that you will not have enough memory on your local workstation So we have an integration environment for example the customer sent to me I started it on my workstation and They wanted to have about 100 gigabyte of memory to start this vagrant environment and I contacted our internal technical team and they gave me a bare metal system with about 30 gigabyte memory because we are a small company. We do not have enough resources so it's also not working and Using OpenStack this way. It's not a problem to be able to access those resources and and it's really simple to use OpenStack as and back end for for vagrant So you simply have to use one of the provided plug-ins. There are two at the moments and they are all based on the vagrant Rackspace plug-in. So vagrant Rackspace plug-in is for consuming the Rackspace cloud servers because they have some special API and then you have the vagrant OpenStack provider provided by this company and Another one vagrant OpenStack plug-in provided by another company and we will use the first plug-in in this session so there are several different configuration directives in this plug-ins and I think the OpenStack provider plug-in is at the moment The better plug-in, but this will maybe change in the future To install it, we simply have to vagrant plug-in install call and the vagrant OpenStack provider is simply a ruby jam and you can simply insert by calling vagrant plug-in install vagrant OpenStack provider and the jam will be installed inside the Virtual vagrant ruby directories. So you can use it as a normal user. You do not have to use privileged user and The configuration looks the same like for virtual box The only difference here is that you have to explicitly specify the Username because normally every cloud image has a different SSH username for example for the Ubuntu image it's Ubuntu For the service image. It's some other user and for OpenSuser. It's normally the Linux user so it depends on the image So you have to set the username and then you can Simply define the OpenStack parameters by calling configVM provider. This will create an OpenStack configuration object and now you have to Get the cloud credentials from Horizon for example So you can simply download it in the web interface So we have So this is some public cloud provider from from Europe And then you can go there in the access and security panel for the German availability zone and then you can download this OpenStack RCE file and inside this RCE file you have the tenant ID and you have the password of course But not in the horizon file you have to enter it manually, but I had entered the password in the background file so Oh, why not? It doesn't matter So you only need tenant ID, user ID the Keystone API endpoint and The password and maybe the region if you have not the default region like region 1 you have to specify the region This will result in This configuration block so you have the parameters for each of the credential parameters and then you can set them Okay, that's not all because of course we need an image We want to start so the the record box will be replaced by an OpenStack image. We need a flavor So you have not to specify the virtual box resources. So we simply use a flavor We need a floating IP address By default the recurrent plug-in users of floating IP address to enter the created instance So we have not to use a public available internal network attached to the instance So we can simply use a floating IP address to access the instance, but you also need an internal network because the floating IP address is only Nutted on the instance so without adding an internal network The plug-in will try to attach the instance on the external network and this is not possible So if it is possible probably something in your environment is broken You have some helper comments to list the resources on the public cloud So you can simply call vagrant OpenStack flavor list for example to list all available flavors on the cloud or Vacrant floating IP list to list all available floating IP foods and assigned floating IP addresses The same for the images. So vagrant image list will list all available images And then you can complete the configuration by adding the flavor of IP and image and then you can try to start it By first defining the node so this will give us a new node object We configured the provider with two dentures. We defined a new node and then We would start it. So there's the password or I should first show them So we would start it and then we will have the following issue also we have not specified the internal network and So OpenStack tries to assign the instance to the external network. This is forbidden so first we have to create the internal network attached to a new router and so that we have connection from the internal network to the external network and This will result in the following network topology, so This one so we have the router attached to the internal network connected with the public network attached here with Gateway interface and this way we can attach instances in the internal network And we are able to assign floating IP addresses on the public network and then we can access the internal network through the router and we can Set this internal network here this was networks is like internal and now we can start One instance by simply calling again recurrent up and this will now Connect the Keystone API and so on the common novel workflow and It will take now some time to instance to initiate the instance But we should already so here this is our new instance now and we have a New floating IP address So this one is now assigned to our new instance and we have a new key pair so that we just vagrant can access the new instance and Now recurrent tries to connect this instance with SSH to check if it is usable already And so we take some time Okay, that's it and Now we can access the instance with vagrant SSH like before As we started the instance with the virtual box provider and it looks like the same so you have not a difference so now we are running on I think key VM and This opens stack as the back end and before we run this virtual box as the back end and we can simply use the same images shared on both infrastructures and the end user using this regular my moment has not a Different behavior. So we also have to share folders for example But we cannot use the virtual box file system here, of course so we have simply the Async in background and here we have all the files available on the outside on the local workstation So if you create a file here, this should be available Not working It should be working in both directions So what may be this is broken or I have not configured it or something like that No, it's not working. So it should work but said you have a sync in both directions So you create one file on the local system and it will be synced with air sync to the remote system I'm not sure what what has broken at the moment No, not thinking You have to keep in mind that you are an open stack. So for example, you cannot use forwarded ports. So all of the Network configuration parameters of Recreant are not working for example Config vm network for forwarded ports. This is not working because you have already in floating a peer-dress assigned to each instance So you can access all Ports on the instances. You simply have to attach the security groups To open port 80 for example So the workaround for using forwarded ports is simply to assign the security group to open port 80 and then you can access Port 80 on the public floating a peer-dress assigned to the record instance And that's the same for the volumes for example, you cannot create volumes with Vbox manage So you have to use a thinner to first create the volume on open stack and then you can assign volumes to instances with the configuration object So this will simply attach the previously created volume recurrent to the instance And then you can use the second block storage inside the the record file Yeah, that's it Anybody has a question? I Have some real world's recurrent examples in the context of open stack So this may be interesting as a starting point. So for example, you have DevStack recurrent. This is a recurrent box simply Starting a DevStack environment. We have monaska recurrent This is simply in development environment for for monaska, and you have pec stack recurrent. This is an recurrent Developed by by our company so that we can use Simply development environment for open stack. So it will simply call pec stack and we'll start it on centOS. Yeah, please Yes, of course so you don't need it because you can attach an internal network for example on the open stack side and you know the appear address of this internal network and this way you can access the appear addresses and For open stack you have to look up the floating appear addresses If you want to access directly with SSH Docker is not a fully virtualization platform. So I cannot contain our windows for example Yes, that's not really a question to worry about that. Actually, I am the developer of this plugin cool I am the main maintainer and so first. Thank you for using it and thank you for talking about it Thank you for writing and yeah, and I just wanted to say to everyone here. We are always looking for new contribution So if you are interested to contribute to the project if you want to want to get involved We always welcome new contributors. So it's not very easy to getting in Just easy to do no basics about Ruby development So if you're interested just come to see me or go and get up and comment and an issue or whatever Any more questions So that might be one argument for like why images rather than containers not to move production to containers So, thank you everyone for being here