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

example ansible setup repo #6237

Merged
merged 8 commits into from Apr 7, 2015
Merged

example ansible setup repo #6237

merged 8 commits into from Apr 7, 2015

Conversation

@eparis
Copy link
Member

@eparis eparis commented Mar 31, 2015

This is a basic ansible repo that will do a couple of things

  1. set up an etcd node
  2. set up a master running apiserver, scheduler, controller-manager
  3. setup any number of nodes

Hopefully this can be expanded to do things like set up skydns, set up a
private docker repo, set up an overlay network (flannel) etc etc. But
right now all it does is set up etcd and configure a master and nodes.

@googlebot
Copy link

@googlebot googlebot commented Mar 31, 2015

Thanks for your pull request.

It looks like this may be your first contribution to a Google open source project, in which case you'll need to sign a Contributor License Agreement (CLA) at https://cla.developers.google.com/.

If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check the information on your CLA or see this help article on setting the email on your git commits.

Once you've done that, please reply here to let us know. If you signed the CLA as a corporation, please let us know the company's name.

@eparis
Copy link
Member Author

@eparis eparis commented Mar 31, 2015

@nzwulfin

Today there exist 2 repos which try to configure kubernetes using ansible.

https://github.com/eparis/kubernetes-ansible
https://github.com/nzwulfin/ansible-atomic

I'd like to see these merged, potentially IN the kubernetes tree. If @nzwulfin is not interested, we may want to move forward anyway.

This is a stripped down version of both my repo and ideas from his repo. It does very very little. This is not a replacement for the salt-stack cluster setup. It only does some small portion of those things.

@eparis eparis force-pushed the ansible branch 2 times, most recently from 52824f2 to f7b1e96 Mar 31, 2015
@vmarmol
Copy link
Contributor

@vmarmol vmarmol commented Apr 1, 2015

@eparis any recommended reviewers? :)

@brendandburns
Copy link
Contributor

@brendandburns brendandburns commented Apr 2, 2015

I'm going to say we blind LGTM this, as it is in contrib, and I'm not sure we have anyone who's expert enough in ansible to say anything deep.

A README.md might be nice to help explain how to use it.

@brendandburns brendandburns self-assigned this Apr 2, 2015
@eparis
Copy link
Member Author

@eparis eparis commented Apr 2, 2015

@jsafrane could also be a reviewer (I believe @nzwulfin is out until next week)

@googlebot googlebot added cla: no and removed cla: yes labels Apr 2, 2015
@jsafrane
Copy link
Member

@jsafrane jsafrane commented Apr 3, 2015

  • I miss some readme on how to use it.
  • It's very Fedora specific. This is not bad, it's just not mentioned anywhere. Other distros don't have /etc/kubernetes, they have /etc/default with different option names.
  • What is ansible/library/rpm_facts.py good for? All these facts can be acquired using Ansible itself.

@eparis
Copy link
Member Author

@eparis eparis commented Apr 3, 2015

How do I use ansible to get installed (or running) rpms? I couldn't find a way other than my own module to collect those facts....

@jsafrane
Copy link
Member

@jsafrane jsafrane commented Apr 3, 2015

The same way as you do it in the python module:

---
- shell: rpm -q iptables-service
  register: has_iptables

@eparis
Copy link
Member Author

@eparis eparis commented Apr 3, 2015

yes, that's what i did do, I just hated having

when has_iptables.rc == 0

throughout the code when custom facts lets me do

when has_iptables

guess it's just style, i'm not strongly attached.

@jsafrane
Copy link
Member

@jsafrane jsafrane commented Apr 3, 2015

I do not have any strong preference either, I just find the extra python module to be overkill here. What about the other facts, like is_atomic? It's not trivial to get, you need 3 tasks to do it and still it's in yaml and not in python.

@eparis
Copy link
Member Author

@eparis eparis commented Apr 3, 2015

You're probably right, I should move back into the playbook.

eparis added 2 commits Apr 3, 2015
This is a basic ansible repo that will do a couple of things

1) set up an etcd node
2) set up a master running apiserver, scheduler, controller-manager
3) setup any number of nodes

Hopefully this can be expanded to do things like set up skydns, set up a
private docker repo, set up an overlay network (flannel) etc etc.  But
right now all it does is set up etcd and configure a master and nodes.
@eparis
Copy link
Member Author

@eparis eparis commented Apr 3, 2015

@jsafrane What do you think of this?

@eparis eparis force-pushed the ansible branch 2 times, most recently from 5408df0 to 5e90c28 Apr 3, 2015
eparis added 5 commits Apr 3, 2015
There is no need for a python fact collector, just do it in ansible
commands instead
The distinction between all/etcd/masters wouldn't make sense for a
non-developer
True, we can only have one master today, but this gets us ready for when
it comes later
@jsafrane
Copy link
Member

@jsafrane jsafrane commented Apr 7, 2015

It looks good to me.

@nzwulfin
Copy link

@nzwulfin nzwulfin commented Apr 7, 2015

@eparis I'm back around now. I think this is a good place to start some merging, I just need to check internally on the CLA for good corporate citizenship.

@brendandburns
Copy link
Contributor

@brendandburns brendandburns commented Apr 7, 2015

I'm happy to merge this, once the CLA is set.

@brendandburns
Copy link
Contributor

@brendandburns brendandburns commented Apr 7, 2015

erm, forgot it was eparis as the original author... merging.

brendandburns added a commit that referenced this issue Apr 7, 2015
example ansible setup repo
@brendandburns brendandburns merged commit 3a6c037 into kubernetes:master Apr 7, 2015
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

6 participants