Next, let’s create the initial version of our service. # Gemfile source '' gem 'sinatra', require: 'sinatra/base' gem 'sinatra-contrib' gem 'activerecord' gem 'mysql2' gem 'sinatra-activerecord' gem 'rake' gem 'puma' group :development do gem 'ruby-debug-ide' end I'm also going to add ruby-debug-ide, so we can debug our application remotely (more on that later). So we'll start by creating a Gemfilewith our dependencies. Our rest API will be using sinatra(a lightweight DSL for quickly creating web apps) and mysql to handle the data. This allows me to deploy a minimalistic version of my application into my development environment, and then iterate directly there. When building a new application, I like to begin by defining a ‘skeleton’ of the app. To keep it simple, it will only have two services: the ruby API, and a database to store the books. Today, we’re building a service to store and retrieve information about books. Pick the “Empty Project” template and call it books.Ĭreate a new project in RubyMine Define the application manifests Start by opening RubyMine and creating a new project for your application and development environment. ✓ Logged in as rberrelleza ✓ Updated context 'cloud_okteto_com' in '/Users/ramiro/.kube/config' Run 'okteto namespace' every time you need to activate your Okteto context again Create a new Ruby project $ okteto login Authentication will continue in your default browser You can also open a browser and navigate to the following address. If you don't have an account already, you'll be prompted to create a free account. Run okteto loginin your local console to connect your local machine with your Okteto Cloud account and download your credentials. To keep this example simple, we’ll be using Okteto Cloud to deploy the development environment, but the same instructions apply if you’re using your own Okteto Enterprise instance. Okteto is compatible with any Kubernetes cluster, local or remote. Windows Download and add it to your `$PATH`. We’ll be using it to create and launch our development environment. The Okteto CLI is an open-source single-binary application that allows you to deploy development environments (among other things) in any Kubernetes cluster. You deploy your application with one click, select the component you’re going to develop on, and you’re ready to go in seconds. This can be as simple as a single container or as complex as a microservice-based Cloud Native Application. The Okteto Developer platform allows you to spin up an entire development environment in Kubernetes with one click. Today, I’m going to show you how you can use okteto to define and deploy a fully configured remote development environment for your ruby applications, how to integrate it with RubyMine, and how to use it to build the fastest development experience for Cloud Native applications. In the past, we’ve talked about how to develop remotely with VS Code and P圜harm. Remote Development Environments with RubyMine, Okteto, and Kubernetes
0 Comments
Leave a Reply. |