galal-hussein / rancher-ansible Goto Github PK
View Code? Open in Web Editor NEWUsing Ansible to run Rancher platform and register hosts
Using Ansible to run Rancher platform and register hosts
When I run the playbook "Creating AWS Rancher stack" completes successfully however "Setting up Rancher Server gives me the following error. I've made sure I have everything exactly as in your README with the exception that I updated the AMI, Region and other details in the aws_vars.yml file necessary for my environment.
Parsed /vagrant/infrastructure/aws/providers/aws/inventory/ec2.py inventory source with script plugin
META: inventory successfully refreshed
META: ran handlers
META: ran handlers
Read vars_file 'providers/aws/vars/aws_vars.yml'
[WARNING]: Could not match supplied host pattern, ignoring: tag_InventoryName_rancher_stack_rancher_server
PLAY [Setting up Rancher Server] ***************************************************************************************************************************************************skipping: no hosts matched
Read vars_file 'providers/aws/vars/aws_vars.yml'
[WARNING]: Could not match supplied host pattern, ignoring: tag_InventoryName_rancher_stack_rancher_agent
PLAY [Register Rancher Hosts] ******************************************************************************************************************************************************skipping: no hosts matched
PLAY RECAP *************************************************************************************************************************************************************************localhost : ok=1 changed=0 unreachable=0 failed=0
Can you please help with this? I tried looking for a work around this but was not successful
TASK [rancher-agent : Return the registration token URL of Rancher server] *****
fatal: [rancher-agent-1]: FAILED! => {"changed": false, "connection": "close", "content": "{\"id\":\"e057d7a4-1c06-43c4-903a-692aae58f35f\",\"type\":\"error\",\"links\":{},\"actions\":{},\"status\":405,\"code\":\"Method not allowed\",\"message\":\"Method not allowed\",\"detail\":null,\"baseType\":\"error\"}", "content_length": "189", "content_type": "application/json; charset=utf-8", "date": "Fri, 06 Oct 2017 10:04:50 GMT", "expires": "Thu, 01 Jan 1970 00:00:00 GMT", "failed": true, "json": {"actions": {}, "baseType": "error", "code": "Method not allowed", "detail": null, "id": "e057d7a4-1c06-43c4-903a-692aae58f35f", "links": {}, "message": "Method not allowed", "status": 405, "type": "error"}, "msg": "Status code was not [201]: HTTP Error 405: Method Not Allowed", "redirected": false, "server": "Jetty(9.2.11.v20150529)", "set_cookie": "PL=rancher;Path=/", "status": 405, "url": "http://192.168.33.10:8080/v2/registrationtokens?projectId=1a8", "x_api_account_id": "1a8", "x_api_client_ip": "192.168.33.11", "x_api_roles": "owner", "x_api_schemas": "http://192.168.33.10:8080/v2/schemas", "x_api_user_id": "1a1", "x_rancher_version": "v2.0.0-alpha7"}
You have "Using Ansible to to run Rancher platform and register hosts" instead of "Using Ansible to run Rancher platform and register hosts" in repo description...
When go through the recommend ansible repo in Rancher README (https://github.com/joshuacox/ansibleplaybook-rancher), I like yours more.
But there are some other modules included which I don't think it is a good idea.
Let's focus it on Rancher Ansible playbook only.
It should assume that Docker has been installed, it can be prepared by seperate Docker ansible playbook, or installed into base IMAGE directly (such as via packer).
The only thing Rancher ansible need check is, Docker version must be newer than v1.9.1+
I understand you use them as a sample for others, but I hope it can be removed out of the repo. Or you can move it to test sub-folder as sample.
Since we have Rancher server/hosts running, we can create mysql and wordpress container in Rancher directly.
And if you'd like to show us the sample, it will be better to do it via api in rancher.
add features to set a local admin account and generate an API key/pass to make the playbook work in production environment.
Can add new feature to integrate with ldap or active directory later.
Python 3 is installed in my base images. pip3 and python3 are symlinked by default in my base images. Are there any reasons to keep Python 2.7 in your roles?
This is nice job you did. Could you please confirm where you input the docker module, or you made it by yourself?
Seems your codes only work for Ubuntu 14.04
https://github.com/galal-hussein/Rancher-Ansible/blob/master/roles/docker/tasks/main.yml#L2
So why not use the exist ansible docker directly?
Whether or not to translate
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.