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

immutable playbook #82

Merged
merged 18 commits into from
Mar 8, 2018
Merged

Conversation

mbukatov
Copy link
Collaborator

@mbukatov mbukatov commented Mar 4, 2018

This change default site.yml.example playbook file to be usable without changes. All ansible variables are now suggested to be placed in the inventory file (or variable file).

This is work in progress, waiting for feedback.

tendrl-bug-id: #74

@mbukatov
Copy link
Collaborator Author

mbukatov commented Mar 4, 2018

# Run yum update.
#

- hosts: all
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a specific reason why we are doing this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Previously, we expected that admin will edit the main playbook file so that he will notice what's going on there, commenting out or tweaking stuff to fit his needs. But this approach didn't work. So now, we no longer expect admin to look into the file and tweak it - which is what this pull request is about, and removal of "run yum update" task was done here as it's not obvious we are doing it in the playbook and some people may not want to run full system update during Tendrl installation.


## Setup with Vagrant using virtualbox provider

TODO
Copy link
Contributor

Choose a reason for hiding this comment

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

I think its a good idea to talk about vaiables like:
tendrl_copr_repo
etcd auth related(etcd_tls_client_auth, etcd_cert_file etc)
The respective README files now, but atleast linking it to this file will be really helpful

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I could mention these variables in a section where I talk about optional variables. Right now it states:

  1. Add optional ansible variables into the invenory file.

Based on Tendrl documentation and description in README files of
tendrl-ansible roles, specify values for variables you like to tweak.

This is important because some features tendrl-ansible can help you
with are disabled by default as they require additional user input.

This includes etcd tls client authentication and tendrl notifier
configuration for snmp or smtp. Other features such as firewalld setup
for Tendrl can be disabled if needed.

Would your suggestion be addressed by mentioning the variables ( tendrl_copr_repo, etcd_tls_client_auth, ...) in this section?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@nthomas-redhat Does 752319f address your suggestion?

@mbukatov mbukatov added this to the Milestone 3 (2018) milestone Mar 5, 2018
@mbukatov
Copy link
Collaborator Author

mbukatov commented Mar 5, 2018

Based from @fbalak , I'm going to add a section related to expand cluster.
Update: added in commit 14228ae

README.md Outdated
* `tendrl-server`: installation of **Tendrl Server** machine (where Tendrl api,
web and etcd are running)
* `tendrl-storage-node`: installation of **Tendrl Storage Node** machines
(Gluster servers, which you would like to monitor by Tendrl)
Copy link
Contributor

Choose a reason for hiding this comment

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

When installed form rpm, the roles contain prefix tendrl-ansible., is it ok to reference them here in README file without the prefix? (If I didn't miss something, this README is not updated during package creation.)

Copy link
Member

Choose a reason for hiding this comment

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

For the entry about "tendrl-storage-node: installation of Tendrl Storage Node machines (Gluster servers, which you would like to monitor by Tendrl)..."

I might suggest some mention that the tendrl-storage node is the tendrl agent (aka node agent) as it's really an agent, and the "tendrl-storage-node" is may be confusing to the user.

Copy link
Collaborator Author

@mbukatov mbukatov Mar 6, 2018

Choose a reason for hiding this comment

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

@dahorak yeah, good point - I need to unify the role names for both package and source repo
update: hopefully unified in 828f55b

README.md Outdated
as well.

And last but not least, both `tendrl-server` and `tendrl-storage-node` contains
many variables which one can use to tweak the installation. See README files of
Copy link
Contributor

Choose a reason for hiding this comment

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

To be clear, I would add ...both tendrl-server and tendrl-storage-node roles contains...

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixed in 818ac41

README.md Outdated

## What installation steps from Tendrl installation documentation are not part of tendrl-ansible?

This is should be clear from [Tendrl installation
Copy link
Contributor

Choose a reason for hiding this comment

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

Probably spare is... in the This is should be clear... sentence.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed in a3091aa

* Installation and configuration of GlusterFS on the machines, see
[gdeploy](https://gdeploy.readthedocs.io/en/latest/) for automation of this
task.
* Setup of dedicated disk for etcd and graphite data directories.
Copy link
Contributor

Choose a reason for hiding this comment

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

If it would be possible, it would be nice to have link to the particular requirement here.

Copy link
Collaborator Author

@mbukatov mbukatov Mar 6, 2018

Choose a reason for hiding this comment

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

I would rather do as few such links as possible. The guide is a moving target and linking into it may break soon. The whole guide is linked in the beginning of the section.

Copy link
Contributor

@dahorak dahorak left a comment

Choose a reason for hiding this comment

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

I would suggest just to fix few small typos and similar issues.

README.md Outdated
* `etcd_fqdn` configure tendrl components to be able to connect to etcd
instance
* `graphite_fqdn` configures tendrl components (this value doesn't
reconfigure graphite itself!) to be able to connect to graphite instance
Copy link
Contributor

Choose a reason for hiding this comment

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

I would put the note in brackets at the end of the description:

* `graphite_fqdn` configures tendrl components to be able to connect to graphite instance
  (this value doesn't reconfigure graphite itself!)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed in b4dfed1

README.md Outdated
for Tendrl can be disabled if needed.

5) If you use tendrl-ansible from rpm package, copy `site.yml` playbook into
local directory (where you already store the inventory file):
Copy link
Contributor

Choose a reason for hiding this comment

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

I think, that working directory would be slightly better than local directory.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ok, fixed in a2646c0

README.md Outdated
$ ansible-playbook -i inventory_file site.yml
```

Assuming we have deployed ssh keys on the machines and have a cluster
Copy link
Contributor

Choose a reason for hiding this comment

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

The note about ssh keys is already mentioned in the step 6, so I'm not sure if it is required here?
And cluster already installed means Gluster cluster?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Repetition in this context is not a bad thing, but good point about gluster, fix: c48bc68

README.md Outdated
Assuming we have deployed ssh keys on the machines and have a cluster
already installed and running there.

9) Log in to your tendrl server at ``http://ip.of.tendrl.server`` with
Copy link
Contributor

Choose a reason for hiding this comment

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

I would use http://tendrl.example.com instead of http://ip.of.tendrl.server (maybe with some note describing what it is - pointing back to the example inventory file). I think it is not necessary to use IP address (instead of hostname).

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

good point, fixed in: 1c9d195

README.md Outdated
* `etcd_fqdn` configure tendrl components to be able to connect to etcd
instance
* `graphite_fqdn` configures tendrl components (this value doesn't
reconfigure graphite itself!) to be able to connect to graphite instance
Copy link
Member

@julienlim julienlim Mar 5, 2018

Choose a reason for hiding this comment

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

[all:vars]

This is awesome to now have this in the inventory file as opposed to editing them in the site.yml file!

Copy link
Member

@julienlim julienlim left a comment

Choose a reason for hiding this comment

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

@mbukatov I've reviewed and made some comments directly.

I've also another question/comment:

(1) Will you provide some guidance how someone can run the playbook as non-root?

I like the changes I read about, i.e. adding all:vars into the inventory file to make it easier to use the playbooks, support for production vs. non-production environments, instructions to run the precheck.yml, etc.

Nice work!

README.md Outdated
for Tendrl can be disabled if needed.

5) If you use tendrl-ansible from rpm package, copy `site.yml` playbook into
local directory (where you already store the inventory file):
Copy link
Member

Choose a reason for hiding this comment

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

"4) Add optional ansible variables into the invenory file."

Can you provide specific examples for the optional ansible variables into the invenory (typo... should be inventory) file" i.e. tls client authentication and tendrl notified for SNMP or SMTP, firewalld?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

You mean something like this?

This includes etcd tls client authentication (etcd_tls_client_auth and other variables), tendrl notifier configuration for snmp or smtp (tendrl_notifier_email_id and other variables), and other tweaks (eg. tendrl_copr_repo variable of tendrl-copr role).

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@julienlim Does 752319f address your suggestion?

Copy link
Member

Choose a reason for hiding this comment

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

@mbukatov That works. Thanks.

Addressing feedback from Nishanth and Ju.
Expand cluster section added based on suggestion from fbalak.

The procedure described in this commit is based on ongoing specification
for cluster expansion:

Tendrl/specifications#254

That said, the expand procedure is not fully finished at the time of
writing this commit, see also:

Tendrl/commons#849
@mbukatov
Copy link
Collaborator Author

mbukatov commented Mar 6, 2018

@fbalak @r0h4n I have added a brief description of expand into the readme file, see commit 14228ae

machines you just added.

4) Now, you should be able to see new servers in Tendrl web ui (see Tendrl
documentation for details).
Copy link

Choose a reason for hiding this comment

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

I would add a mention about a notification that should be present after expand is finished: https://github.com/Tendrl/specifications/pull/254/files#diff-8e71bd954ebddb4a0ef4fd3c413d9f04R90

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I will add there more details, but when we have this resolved Tendrl/commons#849

This is needed to have the same role name for both rpm packaged
tendrl-ansible and the version straight from the git repository.
@mbukatov
Copy link
Collaborator Author

mbukatov commented Mar 7, 2018

(1) Will you provide some guidance how someone can run the playbook as non-root?

@julienlim I have added an example for this in 5f53a29

@mbukatov mbukatov changed the title wip: immutable playbook immutable playbook Mar 7, 2018
@mbukatov mbukatov merged commit 216220f into Tendrl:master Mar 8, 2018
@mbukatov mbukatov deleted the issue_74_immutable_playbook branch March 8, 2018 00:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants