All Projects → Netflix → Titus Control Plane

Netflix / Titus Control Plane

Licence: apache-2.0
Titus is the Netflix Container Management Platform that manages containers and provides integrations to the infrastructure ecosystem.

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Titus Control Plane

Netshoot
a Docker + Kubernetes network trouble-shooting swiss-army container
Stars: ✭ 3,709 (+1215.25%)
Mutual labels:  containers
Portus
Authorization service and frontend for Docker registry (v2)
Stars: ✭ 2,880 (+921.28%)
Mutual labels:  containers
Lxd
Powerful system container and virtual machine manager
Stars: ✭ 3,115 (+1004.61%)
Mutual labels:  containers
Eliot
Open source system for managing containerized applications in IoT device
Stars: ✭ 258 (-8.51%)
Mutual labels:  containers
Dockly
Immersive terminal interface for managing docker containers and services
Stars: ✭ 3,034 (+975.89%)
Mutual labels:  containers
Awesome Rancher
Curated list of Rancher resources
Stars: ✭ 265 (-6.03%)
Mutual labels:  containers
Kubernetes
Production-Grade Container Scheduling and Management
Stars: ✭ 83,715 (+29586.17%)
Mutual labels:  containers
Docker Atlassian Confluence
Atlassian Confluence wrapped in a Docker image
Stars: ✭ 280 (-0.71%)
Mutual labels:  containers
Dotfiles
Installing
Stars: ✭ 2,948 (+945.39%)
Mutual labels:  containers
Service Fabric
Service Fabric is a distributed systems platform for packaging, deploying, and managing stateless and stateful distributed applications and containers at large scale.
Stars: ✭ 2,874 (+919.15%)
Mutual labels:  containers
Simpleator
Simpleator ("Simple-ator") is an innovative Windows-centric x64 user-mode application emulator that leverages several new features that were added in Windows 10 Spring Update (1803), also called "Redstone 4", with additional improvements that were made in Windows 10 October Update (1809), aka "Redstone 5".
Stars: ✭ 260 (-7.8%)
Mutual labels:  containers
Blockchain Network On Kubernetes
Demonstrates the steps involved in setting up your business network on Hyperledger Fabric using Kubernetes APIs on IBM Cloud Kubernetes Service.
Stars: ✭ 261 (-7.45%)
Mutual labels:  containers
Crashcart
CrashCart: sideload binaries into a running container
Stars: ✭ 268 (-4.96%)
Mutual labels:  containers
Service Fabric
We've moved!
Stars: ✭ 258 (-8.51%)
Mutual labels:  containers
Lxdmosaic
Web interface to manage multiple instance of lxd
Stars: ✭ 270 (-4.26%)
Mutual labels:  containers
Kubernetes Java Sample
Kubernetes Hands-on Workshop
Stars: ✭ 254 (-9.93%)
Mutual labels:  containers
Stargz Snapshotter
Fast docker image distribution plugin for containerd, based on CRFS/stargz
Stars: ✭ 263 (-6.74%)
Mutual labels:  containers
K8s Sidecar Injector
Kubernetes sidecar injection service
Stars: ✭ 280 (-0.71%)
Mutual labels:  containers
Frappe docker
Docker images for production and development setups of the Frappe framework and ERPNext
Stars: ✭ 277 (-1.77%)
Mutual labels:  containers
K8s Tew
Kubernetes - The Easier Way
Stars: ✭ 269 (-4.61%)
Mutual labels:  containers

Titus Control Plane

Build Status Apache 2.0

Overview

Titus is the Netflix Container Management Platform that manages containers and provides integrations to the infrastructure ecosystem. This repository contains the control plane components which are responsible for accepting job requests and scheduling containers on agents.

Documentation & Getting Started

netflix.github.io/titus

Building and Testing

For reference, check some of the scripts commonly used by committers in the scripts/dev/ folder.

Building

./gradlew build

Run Tests

./gradlew test

Run All Tests (including integration)

./gradlew testAll

Extensions

There are several extensions in the titus-ext folder for integrations with various systems. In order to use these extensions, a wrapper project that reconfigures the guice bindings is needed. A tutorial project for binding the different implementations is coming soon.

Local testing with docker-compose

docker-compose together with docker-engine can be used to stand up a local cluster with all components necessary to run titus containers. Each component (titus-master, titus-gateway, mesos-master, zookeeper, titus-agent) will run as a separate docker container, and Titus containers will be launched as nested containers (docker-in-docker) inside the agent container.

The last versions known to work:

  • docker-engine 18.06.0-ce
  • docker-compose 1.22.0

To build and launch all components:

docker-compose build
docker-compose up -d

Ports 7001 (http) and 7104 (grpc) from titus-gateway will be exposed locally:

curl localhost:7001/api/v2/status
curl localhost:7001/api/v2/leader

Logs can be inspected with docker-compose logs. For agent logs, journald can be used in a shell inside the agent container:

docker-compose exec agent bash
(agent) $ journalctl

# Note: some warnings and errors are to be expected on those logs
# Not all systemd units will work when not on an EC2 VM

# list nested docker containers launched by Titus
(agent) $ docker ps

By default, all titus-agent containers will join a cluster named unknown-instanceGroup. Before any tasks can be scheduled, that cluster needs to be activated. Note that this is necessary every time the Titus master is restarted, since instanceGroup state is not being persisted:

curl localhost:7001/api/v3/agent/instanceGroups/unknown-instanceGroup/lifecycle \
  -X PUT -H "Content-type: application/json" -d \
  '{"instanceGroupId": "unknown-instanceGroup", "lifecycleState": "Active"}'

If you get an error saying that unknown-instanceGroup does not exist, wait 10s and try again. Agents take some time to get registered.

After that, jobs can be submitted normally. AWS integrations will not work in this mode:

curl localhost:7001/api/v3/jobs \
  -X POST -H "Content-type: application/json" -d \
  '{
    "applicationName": "localtest",
    "owner": {"teamEmail": "[email protected]"},
    "container": {
      "image": {"name": "alpine", "tag": "latest"},
      "entryPoint": ["/bin/sleep", "1h"],
      "securityProfile": {"iamRole": "test-role", "securityGroups": ["sg-test"]}
    },
    "batch": {
      "size": 1,
      "runtimeLimitSec": "3600",
      "retryPolicy":{"delayed": {"delayMs": "1000", "retries": 3}}
    }
  }'

The status of the new job, and its task (container) can be queried with:

curl localhost:7001/api/v3/jobs
curl localhost:7001/api/v3/tasks

# to delete a task or a job:
curl localhost:7001/api/v3/jobs/:id -X DELETE
curl localhost:7001/api/v3/tasks/:id -X DELETE

Components can also be built and deployed individually. E.g.:

# build and deploy an agent
docker-compose build agent
docker-compose up -d agent

# build and deploy titus-master
docker-compose build master
docker-compose up -d master

To add more agents to the cluster:

docker-compose up -d --scale agent=2

Note that it can take ~10s for a new titus-agent to be detected and registered with the default configuration.

After you are done:

# tear everything down
docker-compose down

# or only stop titus-master
docker-compose stop master

LICENSE

Copyright (c) 2018 Netflix, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].