Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added first pass at getting started doc #12

Merged
merged 2 commits into from
Nov 2, 2015
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ docs:
tox -e docs

test:
rm -rf .tox
# rm -rf .tox
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this is deliberate, just delete the line.

tox

itest: test
Expand Down
21 changes: 12 additions & 9 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
.. paasta_tools documentation master file, created by
sphinx-quickstart on Tue Aug 5 17:43:04 2014.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.

paasta_tools: PaaSTA sauce
======================================
paasta_tools: PaaSTA Sauce
==========================

paasta_tools is a Python library. It is the sauce that combines the
individual strands of `PaaSTA <http://y/paasta>`_ -- Jenkins, Docker, Mesos,
etc. -- into a cohesive, highly-available, distributed meal.

Directions
----------
Directions (For PaaSTA Users)
-----------------------------

.. toctree::
:maxdepth: 2
Expand Down Expand Up @@ -74,6 +69,14 @@ Development
upgrading_marathon
upgrading_mesos

Installing The PaaSTA Infrastructure
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. toctree::
:maxdepth: 2

installation/getting_started


Indices and tables
------------------
Expand Down
91 changes: 91 additions & 0 deletions docs/source/installation/getting_started.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
Getting Started
===============

**Warning**: PaaSTA is an opinionated way to integrate a collection of open source components in a holistic way to build a PaaS. It is not optimized to be simple to deploy for operators. It is optimized to not reinvent the wheel and utilized existing solutions to problems where possible.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utilizes

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or utilize, depending on your tense.


PaaSTA has many dependencies. This document provides documentation on installing some of these dependencies, but some of them are left up as an exercise to the reader.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

left as



soa-configs
-----------

soa-configs are the shared configuration storage that PaaSTA uses to hold the description and configuration of what services exist and how they should be deployed and monitored.

This directory needs to be deployed globally in the same location to every server that runs any PaaSTA component. We recommend using a git-based distribution mechanism for access control and auditing.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Strange recommendation since we don't use git for distribution (and it's not clear to me what a "git-based distribution mechanism" is).

I would either expand a bit on how we do soa-configs (git for revision control, gitolite for access control, rsync for distribution) or just strike this sentence and not discuss this issue.


PaaSTA reads particular config files for each service in the soa-configs directory. There is one folder per service. Here is an example tree::

soa-configs
├── web
│   ├── deploy.yaml
│   ├── marathon-dev.yaml
│   ├── marathon-prod.yaml
│   ├── monitoring.yaml
│   ├── service.yaml
│   └── smartstack.yaml
├── api
│   ├── deploy.yaml
│   ├── marathon-dev.yaml
│   ├── marathon-prod.yaml
│   ├── monitoring.yaml
│   ├── service.yaml
│   └── smartstack.yaml
...

For the `soa-configs documentation <yelpsoa-configs>`_ for more information about the structure and contents of these files.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See the


For more information about why we chose this method of config distribution, see watch `this talk on Yelp's soa-config and how they are used <https://vimeo.com/141231345>`_.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/see// (or s/watch//)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how it is used


Docker and a Docker Registry
----------------------------

PaaSTA uses Docker to build and distribute code for each service. PaaSTA assumes that a single registry is available and that the associated components (Docker commands, unix users, mesos slaves, etc) have the correct credentials to use it.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Link to Docker project

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what you're after by saying "a single registry". Delete single?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We currently cannot handle different registries. Other docker-based deployment systems just pull from where you set it (nginx:latest), but paasta only supports a single registry.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok then how about "PaaSTA uses exactly one registry..." and go from there?


The docker registry needs to be defined in a config file in ``/etc/paasta/``. PaaSTA merges all json files in ``/etc/paasta/`` together, so the actual filename is irrelevant, but here would be an example ``/etc/paasta/docker.json``::

{
"docker_registry": "private-docker-registry.example.com:443"
}

There are many registries available to use, or you can `host your own <https://docs.docker.com/registry/>`_.

Mesos
-----

TBD
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a first pass at least fill in links to these projects?


Marathon
--------

TBD

Chronos
-------

TBD

SmartStack
----------

TBD

Sensu
-----

TBD

Jenkins / Build Orchestration
-----------------------------

Jenkins is the suggested method for orchestrating build pipelines for services, but it is not a hard requirement. The actual method that Yelp uses to integrate Jenkins with PaaSTA is not open source.

In practice, each organization will have to decide how they want to actually run the ``paasta`` cli tool to kick off the building and deploying of images. This may be something as simple as a bash script::

#!/bin/bash
service=my_service
sha=$(git rev-parse HEAD)
paasta itest --service $service --commit $sha
paasta push-to-registry --service $service --commit $sha
paasta mark-for-deployment --git-url $(git config --get remote.origin.url) --commit $sha --clusterinstance prod.main --service $service

We designed PaaSTA to use normal command line tools so it could be integrated with opinionated existing workflows.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete opinionated or I guess "existing opinionated workflows" but I don't really know what you're talking about in this context.