MCPcopy
hub / github.com/tsuru/tsuru

github.com/tsuru/tsuru @1.30.0 sqlite

repository ↗ · DeepWiki ↗ · release 1.30.0 ↗
7,412 symbols 42,543 edges 575 files 603 documented · 8%
README

tsuru

Build Status Go Report Card

What is tsuru?

tsuru is an extensible and open source Platform as a Service (PaaS) that makes application deployments faster and easier. With tsuru, you don’t need to think about servers at all. As an application developer, you can: - Write apps in the programming language of your choice - Back apps with add-on resources such as SQL and NoSQL databases, including memcached, Redis, and many others - Manage apps using the tsuru command-line tool

Links:

  • Landing page: https://tsuru.io
  • Full Documentation: https://docs.tsuru.io/
  • How to Contribute: https://docs.tsuru.io/contributing/docker-compose/
  • Repository & Issue Tracker: https://github.com/tsuru/tsuru
  • Talk to us on Gitter: https://gitter.im/tsuru/tsuru

Popular platforms supported:

Quick Start

Getting tsuru-client

Download the latest release for your platform at: https://github.com/tsuru/tsuru-client/releases/

Example for release 1.1.1 and OS X:

$ curl -sSL https://github.com/tsuru/tsuru-client/releases/download/1.1.1/tsuru-1.1.1-darwin_amd64.tar.gz | tar xz

Install Guides

Testing

If everything's gone well you have the tsuru running in a Kubernetes Cluster. Call app list to see tsuru working, this command needs to return one app called tsuru-dashboard.

tsuru app list

Local development

Dependencies

Before starting, make sure you have the following tools installed:

You'll also need the Tsuru Client to interact with the Tsuru API. If you haven't installed it yet, please do so.

For macOS users: We recommend using the qemu driver with socket_vmnet for Minikube clusters. For more information on installing qemu and socket_vmnet, refer to the following links:

Note: If you are using Docker-compatible alternatives like Podman, be sure to specify the DOCKER variable with the correct binary when running make commands. For example: make local.run DOCKER=podman.

Running local environment

To run the Tsuru API locally, you'll need to first set up the local environment. This setup process is crucial because it creates the default configuration files, initializes required dependencies, and prepares your local system to host the Tsuru API. The following command will handle all these tasks:

make local.setup

Once the setup is complete, you won’t need to run this command again unless you want to reset your environment.

After the initial setup, you can start the Tsuru API and its dependencies using the following command:

make local.run

Once the Tsuru API is running, open a new terminal window and configure your Tsuru CLI to point to the local-dev target. This target tells the CLI to interact with your local Tsuru API instance rather than a remote server. You can set the target using this command:

tsuru target-set local-dev

Tsuru's targets function similarly to Kubernetes' kubectl config contexts, allowing you to switch between different environments easily.

To confirm that everything is set up correctly, you can log in and list the clusters managed by your Tsuru API instance:

tsuru login admin@admin.com # password: admin@123
tsuru cluster list

If everything is working as expected, you should see your local Minikube cluster listed as the default provisioner.

Creating an app or job

For that, you will have to create a team, pool and set a label to the minikube nodes to allow deploys on it

tsuru team create my-team
tsuru pool add my-pool

# make sure you are using the right kube config
kubectl label nodes minikube tsuru.io/pool=my-pool

Running Integration tests

In order to run integration tests, you must:

  1. Ensure that your local Tsuru API instance is up and running.
  2. Create a Kubectl config file that must not be $HOME/.kube/config that points only to your Minikube cluster.
  3. Run the integration tests using the following command:
INTEGRATION_KUBECONFIG=<your-minikube-kubeconfig> make local.test-ci-integration

Cleaning up

When you're done working with your local environment, it's important to stop the services to free up system resources. You can stop the dependencies using:

make local.stop

If you want to fully reset your environment, or if you no longer need the Tsuru API and its dependencies on your local machine, you can remove all associated resources using:

make local.cleanup

Extension points exported contracts — how you extend this code

Shutdownable (Interface)
Shutdownable is an interface representing the ability to shutdown a particular resource [9 implementers]
api/shutdown/shutdown.go
Named (Interface)
Named is something that has a name, providing the GetName method. [10 implementers]
provision/provision.go
AppNamespaceLister (Interface)
AppNamespaceLister helps list and get Apps. [6 implementers]
provision/kubernetes/pkg/client/listers/tsuru/v1/app.go
AppCacheService (Interface)
(no doc) [10 implementers]
types/cache/cache.go
Token (Interface)
(no doc) [6 implementers]
types/auth/token.go
QuotaItem (Interface)
(no doc) [10 implementers]
types/quota/quota.go
PoolStorage (Interface)
(no doc) [10 implementers]
types/provision/pool.go
Scheme (Interface)
(no doc) [6 implementers]
auth/scheme.go

Core symbols most depended-on inside this repo

Set
called by 1955
types/quota/quota.go
ServeHTTP
called by 746
api/handler.go
GetValue
called by 723
types/auth/token.go
Get
called by 638
router/config.go
String
called by 577
types/app/version.go
Add
called by 465
types/log/log.go
Error
called by 422
log/log.go
Close
called by 342
types/app/log.go

Shape

Method 4,976
Function 1,545
Struct 706
Interface 118
TypeAlias 47
FuncType 15
Route 5

Languages

Go100%
Python1%

Modules by API surface

app/app_test.go228 symbols
api/app_test.go211 symbols
app/app.go106 symbols
cmd/cmd_test.go103 symbols
api/auth_test.go96 symbols
api/service_instance_test.go90 symbols
provision/provision.go85 symbols
provision/labels.go78 symbols
provision/kubernetes/helpers.go74 symbols
provision/provisiontest/fake_provisioner.go68 symbols
api/job_test.go68 symbols
provision/kubernetes/deploy_test.go66 symbols

Dependencies from manifests, versioned

cloud.google.com/go/compute/metadatav0.9.0 · 1×
github.com/Azure/go-ansitermv0.0.0-2025010203350 · 1×
github.com/adhocore/gronxv1.6.6 · 1×
github.com/beorn7/perksv1.0.1 · 1×
github.com/bradfitz/go-smtpdv0.0.0-2013062317443 · 1×
github.com/cespare/xxhash/v2v2.3.0 · 1×
github.com/cezarsa/formv0.0.0-2021051016541 · 1×
github.com/containerd/logv0.1.0 · 1×
github.com/davecgh/go-spewv1.1.2-0.20180830191 · 1×
github.com/decred/dcrd/dcrec/secp256k1/v4v4.2.0 · 1×

Datastores touched

(mongodb)Database · 1 repos
(mysql)Database · 1 repos

For agents

$ claude mcp add tsuru \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact