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

HOWTO: Successful consul ansible installation in Ubuntu 16.04 locally #14

Closed
zenny opened this issue Mar 28, 2018 · 4 comments
Closed

Comments

@zenny
Copy link

zenny commented Mar 28, 2018

Hi,

In order to install consul with this ansible script locally in Ubuntu 16.04, one needs to do the following step-by-step:

  1. Login as root user (sudoers did not work)

  2. Create a rsa key
    # ssh-keygen -t rsa

  3. Install necessary dependency for 4 below:
    # apt-get install software-properties-common -y

  4. Install latest ansible and dependencies from upstream (requires ansible 2.4+ which is not readily available in ubuntu repository)
    # add-apt-repository ppa:ansible/ansible
    # apt-get update
    # apt-get -y install ansible curl python-simplejson git

  5. Pull this repo (as root itself) and change to the installer directory:
    # git clone https://github.com/consul/installer
    # cd installer

  6. Disable remote_user as it is a local ansible instance:
    # sed -i -e 's/remote_user: vagrant/#remote_user: vagrant/g' consul.yml

  7. Make hosts to reflect localhost (127.0.0.1)
    # echo '[servers]' > hosts
    # echo '127.0.0.1' >> hosts

  8. Make changes to /root/installer/group_vars/all to reflect your own needs.

  9. Run ansible-playbook with -c local flag to run locally.
    # ansible-playbook consul.yml -i hosts -c local --extra-vars "target=servers"

  10. Once finished, browse to the server_ip_address in a browser and login with default credentials:

username: admin@consul.dev
password: 12345678

Once logged in, change admin password. That's all!

Hope this helps for anyone who shall be in my shoes.

Kudos goes to the entire consul team for developing such a thought-provoking software and a comprehensive installer.

Cheers,
/z

@zenny zenny changed the title HOWTO: Successful consul ansible installation in Ubuntu 16.04 HOWTO: Successful consul ansible installation in Ubuntu 16.04 locally Mar 28, 2018
@TheEdu
Copy link

TheEdu commented Oct 13, 2018

i followed this recipe step by step with the default configuration (i didnt edit /root/installer/group_vars/all), but i got the following rails precompile assets error. any idea?
image

@voodoorai2000
Copy link
Member

voodoorai2000 commented Oct 17, 2018

Hey @TheEdu,

Sorry to hear you are having some problems precompiling assets, it could be a number of things... 🤔
Could you open a separate issue so we can center the discussion on that part? 😌

@zenny Thank you so much for the kudos and the walkthrough 🙌
We've updated the docs and created an issue with what is still pending to document in the README
If there is anything we've missed feel free to open an issue or send a PR 😌

I'm closing this issue so that other developers don't feel tempted to ask questions here instead of creating new issues 👍

@kevieman
Copy link

kevieman commented Nov 14, 2018

This worked for me! thank you. ONly when I try ti rerun the playbook it gets stuck on the task rails : Load configuration seeds. To be exact it gets stuck on:

TASK [rails : Load configuration seeds] **************************************************************************
task path: /root/installer/roles/rails/tasks/main.yml:65
<127.0.0.1> EXEC /bin/sh -c '/usr/bin/python /root/.ansible/tmp/ansible-tmp-1542197596.54-5055084817189/AnsiballZ_command.py && sleep 0'

Any help?

@voodoorai2000
Copy link
Member

Hey @kevieman,
Please create a new issue.
It's easier to solve independent issues rather than talking about multiple ones in a single thread.

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

No branches or pull requests

4 participants