• This repository has been archived on 31/Aug/2023
  • Stars
    star
    109
  • Rank 309,270 (Top 7 %)
  • Language
    Go
  • License
    Apache License 2.0
  • Created over 3 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Podman (https://podman.io/) based development-only dependency manager for Linux

tent GitHub all releases

Tent is a CLI tool for running development dependencies such as MySQL, Mongo, ElasticSearch etc inside pre-configured containers using simple one-liners.

Running containers can be accessed via their exposed ports and can be paired with any other application on your system.

Starting a service such as mysql is as simple as executing tent start mysql and you'll never have to look back at it.

But mysql is not the only available service. A list of all the available services can be found on: services.go

Tent is heavily inspired from tighten/takeout and is an experimental project. Hence, care should be taken if you're using it in a critical environment.

Dependencies

  • Linux
  • Podman Installed
  • Podman System Service Running

If you have Podman installed, you can start the system service as follows:

## starts the podman system service
systemctl --user start podman.socket

## enables the podman system service, so it doesn't close on every reboot
systemctl --user enable podman.socket

## stops the podman system service
systemctl --user stop podman.socket

## disables the podman system service, so it doesn't start on every reboot
systemctl --user disable podman.socket

Tent assumes that you're running the service in non-root mode, hence the --user argument is necessary in the above commands.

Installation

Visit the tent release page and download the tent binary to your computer. Open up your terminal where you've donwloaded the file and execute following commands:

chmod +x ./tent

sudo mv ./tent /usr/local/bin

Now the tent command should be available everywhere in your system.

Build From Source

If you're on a Fedora system, the following command should install the necessary development dependencies.

sudo dnf groupinstall "Development Tools" -y && sudo dnf install golang btrfs-progs-devel gpgme-devel device-mapper-devel -y

And on a Ubuntu system, the following command should install the necessary development dependencies.

sudo apt install build-essential golang-go libbtrfs-dev libgpgme-dev libdevmapper-dev -y

If you're on a different system you, may look for equivalent package on the respective package repositories.

Now build and install the application as follows:

git clone https://github.com/fhsinchy/tent.git ~/tent

cd ~/tent

make install

Usage

The tent binary has following commands:

  • tent start <service name> - starts a container for the given service
  • tent stop <service name> - stops and removes a container for the given service
  • tent list - lists all running containers

Most of the services in tent utilizes volumes for persisting data, so even if you stop a service, it's data will be persisted in a volume for later usage. These volumes can listed by executing podman volume ls and can be managed like any other podman volume.

Start a Service

The generic syntax for the start command is as follows:

tent start <service name>

## starts mysql and prompts you where necessary
tent start mysql

## starts redis and mongo and prompts you where necessary
tent start redis mongo

Start Service with Default Configuration

The --default flag for the start command can be used to skip all the prompts and start a service with default configuration

tent start <service name> --default

## starts mysql with the default configuration
tent start mysql --default

## starts redis and mongo with default configuration
tent start redis mongo --default

Stop a Service

The generic syntax for the stop command is as follows:

tent stop <service name>

## stops mysql and removes the container
## prompts you if multiple containers are found
tent stop mysql

## stops all mysql containers and removes them
tent stop mysql --all

## stops redis and mongo then removes the containers.
## prompts you if multiple containers are found for any of the given services.
tent stop redis mongo

## stops all redis and mongo conainers and then removes them
tent stop redis mongo --all

Stop all Services

The --all flag for the stop command can be used to stop and remove all running tent containers at once

tent stop --all

Running Multiple Versions

Given all the services are running inside containers, you can spin up multiple versions of the same service as long as you're keeping the port different.

Run tent start mysql twice; the first time, use the --default flag, and the second time, put 5.7 as tag and 3307 as host port.

Now, if you run tent list, you'll see both services running at the same time.

+--------------+----------------+---------------+---------------+
| CONTAINER              | Image               | PORTS          |
+--------------+----------------+---------------+---------------+
| tent-mysql-5.7-3307    | docker.io/mysql:5.7 | 3307->3306/tcp |
| tent-mysql-latest-3306 | docker.io/mysql:5.7 | 3306->3306/tcp |
+--------------+----------------+---------------+---------------+

Container Management

Containers started by tent are regular containers with some pre-set configurations. So you can use regular podman commands such as ls, inspect, logs etc on them. Although tent comes with a list command, using the podman commands will result in more informative results. The target of tent is to provide plug and play containers, not to become a full-fledged podman cli.

Todo

Although tent is in a stable state right now, there things that I'll have to do. A tentative list is as follows:

  • Set-up proper versioning
  • Write Tests (very important)

That's all for now, this list will certainly change as I keep going working on my project.

More Repositories

1

docker-handbook-projects

Project codes used in "The Docker Handbook"
JavaScript
1,310
star
2

the-docker-handbook

An open-source full-length book on Docker
772
star
3

kubernetes-handbook-projects

Project codes used in "The Kubernetes Handbook"
JavaScript
546
star
4

nginx-handbook-projects

Project codes used in "The NGINX Handbook"
HTML
468
star
5

movieist

REST API powered by Spring Boot written for a freeCodeCamp course
Java
176
star
6

rmbyext

Recursively removes all files with given extension(s)
Python
46
star
7

deno-blog

An experimental blogging application developed with Docker, Deno, Oak and MySQL
TypeScript
45
star
8

guide-to-containerizing-laravel-applications

Project codes used in "A Practical Guide to Containerizing Laravel Applications With Docker"
PHP
38
star
9

laravel-livewire-shopping-cart

A real-time shopping cart powered by Laravel, Livewire and TailwindCSS
PHP
28
star
10

express-mongo-api-boilerplate

A rock solid project template for building Node.js APIs
JavaScript
19
star
11

jeeves

Docker based development-only dependency manager for Windows, Linux, and macOS
Python
13
star
12

guide-to-laravel-passport

An in-depth article on API authentication with Laravel Passport
PHP
13
star
13

opengapps-unofficial-builds

Unofficial builds of opengapps packages for latest android API level (currently 27). Built from their official sources
8
star
14

guide-to-laravel-and-react

An easy-to-follow guide on integrating React.js with Laravel
PHP
7
star
15

guide-to-deploying-laravel-on-elastic-beanstalk

A comprehensive guide to deploying Laravel applications on AWS Elastic Beanstalk
PHP
7
star
16

fhsinchy

The README
5
star
17

multi-container-deployment

Multi-container application deployment in AWS with Docker.
JavaScript
5
star
18

vagrant-boxes

Ready-made Vagrant files for development environments
4
star
19

mcpkgrm

Uninstall macOS packages easily and for free.
Python
4
star
20

guide-to-deploying-laravel-on-vps

A comprehensive guide to deploying Laravel applications on Virtual Private Server
PHP
4
star
21

php-nginx

Dockerfile
3
star
22

tocgen

Dynamically creates table of content for freeCodeCamp articles in markdown format
Python
3
star
23

how-to-create-a-custom-package-for-laravel

Project codes used in "Creating Your Own Laravel Custom Package: A Step-by-Step Guide"
PHP
3
star
24

jwt-auth-in-laravel

Project codes used in "A Detailed Guide to Implementing JWT Authentication in Laravel"
PHP
2
star
25

ignore

A script for generating .gitignore files
Python
2
star
26

using-typesense-with-php

Implementing Search Feature with Typesense and PHP
PHP
2
star
27

docker-and-kubernetes-for-laravel-applications

PHP
2
star
28

spring-neo4j

REST API powered by Spring Boot and Neo4j written for a freeCodeCamp course
Java
2
star
29

inspire

An example Laravel package
PHP
1
star
30

how-to-build-a-search-ui-with-typesense

Building a Search UI with Typesense
Vue
1
star
31

guide-to-laravel-and-mongodb

An easy-to-follow guide on integrating MongoDB with Laravel
PHP
1
star
32

DeliveryDriver

C#
1
star