Garden.io: what is it and why should you be using it? 🪴

Ready to streamline your development and operations processes? In this comprehensive guide, we’ll dive deep into all that Garden.io has to offer, from its powerful features to its user-friendliness. You won’t want to pass up the efficiency and product…


This content originally appeared on DEV Community 👩‍💻👨‍💻 and was authored by Bruno

Ready to streamline your development and operations processes? In this comprehensive guide, we'll dive deep into all that Garden.io has to offer, from its powerful features to its user-friendliness. You won't want to pass up the efficiency and productivity boost that Garden.io can bring to your applications, regardless of their scopes of complexity.

🪴 What is Garden.io?

Garden.io is a cloud native application development, testing, and deployment platform. It defines the build and deployment procedure for your application in a configuration file named 'garden.yml'. It is compatible with a variety of programming languages, including JavaScript, and may be used in projects developed using React, VueJS, NodeJS, and other frontend and backend technologies.

Garden.io was developed in response to the demand for a standardized and adaptable method of managing and deploying applications, particularly in large and complex environments. It was created to support a broad variety of languages and frameworks, be simple to use, connect with well-known tools like Docker and Kubernetes, and be flexible.

The platform has grown in popularity among developers since its inception.
With constant additions of new features and integrations to fulfill the demands of companies and developers, it continues to expand and get better.

brent rambo thumbs up meme

Sounds cool, right? 😉

🤔 Why should you be using it?

I will give you some reasons why you should be using Garden.io in your projects:

  • Garden.io makes complex app management easier by allowing you to describe all of your app's dependencies, build processes, and deployment configurations in a single configuration file.

  • CI/CD processes are streamlined by providing you with a configuration file that defines your pipeline's build, test, and deploy methods, automating the whole process of building, testing, and deploying your code.

  • Garden.io lets you design a consistent workflow for your projects, including the tools and processes for developing, testing, and delivering code. This ensures that all of your projects adhere to the same set of standards and procedures.

  • It supports a wide range of languages and frameworks, including Node.js, Python, and Java, making it a versatile and adaptable solution for managing and deploying your applications.

Let's look at some of the principles that will help you better comprehend the workflow.

🤽‍♀️ DevOps

DevOps is a software engineering methodology that emphasizes cooperation and communication between software developers and information technology (IT) experts while automating software delivery and infrastructure changes.
It seeks to shorten the development lifecycle and enable continuous delivery of high-quality software.

🔮 CI/CD

ci/cd hot dog

Continuous Integration/Continuous Deployment is abbreviated as CI/CD. It is a software development approach that tries to increase software delivery speed, quality, and dependability.

Continuous Integration (CI) is the technique of merging code changes into a central repository on a frequent basis, generally many times per day. This helps developers to recognize and resolve issues early in the development process, rather than waiting until later stages when they may be more difficult to resolve.

Continuous Deployment (CD) extends CI by automating the process of delivering code changes to production. This implies that if a change is made and successfully integrated into the central repository, it is immediately deployed to the production environment without any manual involvement.

⚙️ Installing Kubernetes, Docker and Garden.io

To utilize Garden.io, you must first install Kubernetes and Docker on your machine. You will need these as Garden.io relies on Docker and Kubernetes to manage and deploy containerized applications.

📦 Kubernetes

Install Kubernetes using NPM:

npm install -g kubernetes-cli

Install Kubernetes using Yarn:

yarn global add kubernetes-cli

Install Kubernetes using Homebrew:

brew install kubernetes-cli

🐳 Docker

Install Docker using NPM:

npm install -g docker

Install Docker using Yarn:

yarn global add docker

Install Docker using Homebrew:

brew install docker

🪴 Garden.io

After the latter tools have finished installing, it's time to install Garden.io.

Homebrew
brew tap garden-io/garden
brew install garden-cli
Installation script
curl -sfL https://git.io/get-garden | sh -s -- -b /usr/local/bin

The instructions above were designed for MacOS, but you can read more in the documentation if you are using Windows or Linux: https://docs.garden.io/getting-started/1-installation.

gardenio installation complete terminal

After Garden.io finishes installing, you should see a beautiful terminal look like the above!🤩

👨‍💻 Setting up Garden.io

In order to setup Garden.io in your project, run the following command:

garden init

Then, configure the project by adding the following as example to the garden.yml file, which is the file that specifies services, tasks, tests, and so on:

services:
  web:
    build: .
    ports:
      - target: 3000
        published: 3000
        protocol: tcp

The configuration for Garden.io is now complete (based on the specific needs of your project, of course).

🚧 Building the application

After having setup the configurations for Garden.io in your project, you can now run it by navigating to the project directory and running the following command:

garden start

Now that you have setup, configured Garden.io in your project and is now running, Garden will start the project and create a container for each service that you defined in the garden.yml file. If you access http://localhost:3000 in your browser, you should be able to access your project!🎉

🧪 Testing the application

In order to setup testing in your Garden.io (because testing is also important, right?😉), you can do so by first setting up a section in your garden.yml file called tests.

tests:
  my-tests:
    service: web
    command: npm run test

Here, you can define the specific testing that you need for your project. Then, when you run the following command, you should be able to see the test suites running:

garden test

This test, for example, will run npm run test in the web service. See? Testing in Garden.io is as easy as eating a slice of pizza!🍕

🚚 Deploying

The question now is: "How do I deploy a project using Garden.io?" 🤔 Well, it's also easy!😀

You can deploy it to various cloud providers and Kubernetes clusters, by creating a target environment section to your garden.yml file:

target:
  name: my-kubernetes-cluster
  provider: kubernetes

In this example, we specify that the target environment is a Kubernetes cluster called my-kubernetes-cluster. Note that you would need to have kubectl installed on your machine and have access to it in order to deploy to a Kubernetes cluster.

Then, you run the following command to deploy it:

garden deploy

After completing these steps, Garden.io will start the deployment process and create the necessary resources in your cloud provider or Kubernetes cluster. You can accompany the state of deployment in your lovely terminal 🥰

deploying terminal laptop

Then, in order to access your deployed project, open the URL or IP address of the deployed environment, depending on the specific cloud provider or Kubernetes setup you are using. After following these steps, you can see how Garden.io is so easy to work with when setting up, testing and deploying your project 😁

🌻 The official documentation

🪴 Garden.io's official documentation may be found here: https://docs.garden.io/ -
It covers all of the information you'll need in greater detail.

roses aesthetic

And what a beatiful documentation they have written!👏

Thank you for reading!👋

I'd like to thank you for reading my article! I hope it helped you getting to know a great tool and that it can be useful in your future projects 😁 I would also like to invite you to follow me on Dev.to, as well as my other platforms:

GitHub: https://github.com/bcostaaa01
Twitter: https://twitter.com/bruno2001costa

I look forward to seeing you on my next one!

Until then,
Happy Coding!👩‍💻


This content originally appeared on DEV Community 👩‍💻👨‍💻 and was authored by Bruno


Print Share Comment Cite Upload Translate Updates
APA

Bruno | Sciencx (2023-01-31T21:47:15+00:00) Garden.io: what is it and why should you be using it? 🪴. Retrieved from https://www.scien.cx/2023/01/31/garden-io-what-is-it-and-why-should-you-be-using-it-%f0%9f%aa%b4/

MLA
" » Garden.io: what is it and why should you be using it? 🪴." Bruno | Sciencx - Tuesday January 31, 2023, https://www.scien.cx/2023/01/31/garden-io-what-is-it-and-why-should-you-be-using-it-%f0%9f%aa%b4/
HARVARD
Bruno | Sciencx Tuesday January 31, 2023 » Garden.io: what is it and why should you be using it? 🪴., viewed ,<https://www.scien.cx/2023/01/31/garden-io-what-is-it-and-why-should-you-be-using-it-%f0%9f%aa%b4/>
VANCOUVER
Bruno | Sciencx - » Garden.io: what is it and why should you be using it? 🪴. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2023/01/31/garden-io-what-is-it-and-why-should-you-be-using-it-%f0%9f%aa%b4/
CHICAGO
" » Garden.io: what is it and why should you be using it? 🪴." Bruno | Sciencx - Accessed . https://www.scien.cx/2023/01/31/garden-io-what-is-it-and-why-should-you-be-using-it-%f0%9f%aa%b4/
IEEE
" » Garden.io: what is it and why should you be using it? 🪴." Bruno | Sciencx [Online]. Available: https://www.scien.cx/2023/01/31/garden-io-what-is-it-and-why-should-you-be-using-it-%f0%9f%aa%b4/. [Accessed: ]
rf:citation
» Garden.io: what is it and why should you be using it? 🪴 | Bruno | Sciencx | https://www.scien.cx/2023/01/31/garden-io-what-is-it-and-why-should-you-be-using-it-%f0%9f%aa%b4/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.