Skip to content

Commit

Permalink
Merge pull request #1 from mlafeldt/kubernetes
Browse files Browse the repository at this point in the history
Allow installing Kubernetes on top of DCOS
  • Loading branch information
mlafeldt committed Nov 30, 2015
2 parents 2f135a6 + 75c450f commit 489ed9c
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 5 deletions.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ destroy: venv
-e dcos_channel="$(DCOS_CHANNEL)" \
-e dcos_master_setup="$(DCOS_MASTER_SETUP)"

kubernetes: venv
venv/bin/ansible-playbook -v kubernetes.yml

dashboard:
@open $$(./dcos config show core.dcos_url)

Expand Down
17 changes: 12 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,20 @@ your browser:

### Use DCOS CLI

After running `make bootstrap`, you can also use the `./dcos` script to remotely
After bootstrapping DCOS, you can also use the `./dcos` script to remotely
manage your cluster. The script is a convenience wrapper around the [dcos tool]
provided by Mesosphere.
provided by Mesosphere. Run `./dcos` without parameters to get a list of all
available commands.

This example shows how to use the CLI to install and use Kubernetes:
### Install Kubernetes

This will deploy [Kubernetes] on top of DCOS:

make kubernetes

Afterwards, run the `kubectl` subcommand to control the Kubernetes cluster
manager. For example:

./dcos package update
./dcos package install --yes kubernetes
./dcos kubectl run nginx --image=nginx

### Destroy DCOS cluster
Expand All @@ -98,3 +104,4 @@ infrastructure changes.
[Mesosphere DCOS Community Edition EULA]: https://docs.mesosphere.com/community-edition-eula/
[dcos tool]: https://docs.mesosphere.com/using/cli/
[blog]: https://mlafeldt.github.io/blog/getting-started-with-the-mesosphere-dcos/
[Kubernetes]: http://kubernetes.io/
16 changes: 16 additions & 0 deletions kubernetes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
- hosts: localhost
connection: local
gather_facts: False
tasks:
- name: Get list of installed DCOS packages
command: ./dcos package list
register: package_list
ignore_errors: True

- name: Update DCOS package index
command: ./dcos package update
when: "'/kubernetes' not in package_list.stdout"

- name: Install Kubernetes on DCOS
command: ./dcos package install --yes kubernetes
when: "'/kubernetes' not in package_list.stdout"

0 comments on commit 489ed9c

Please sign in to comment.