Coder Social home page Coder Social logo

minishift-up-role's People

Contributors

gregdek avatar kyleabenson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

minishift-up-role's Issues

Switch kube context fails

Hi,
following the Minishift setup guide i'm running into an error during execution of the playbook:

TASK [chouseknecht.minishift : Copy oc client] *********************************
ok: [localhost]

TASK [chouseknecht.minishift : Switch the kube config context] *****************
fatal: [localhost]: FAILED! => {"changed": true, "cmd": "/usr/local/bin/oc config use-context /$(minishift ip | tr . -):8443/developer", "delta": "0:00:00.137669", "end": "2018-10-16 09:14:03.286365", "msg": "non-zero return code", "rc": 1, "start": "2018-10-16 09:14:03.148696", "stderr": "error: no context exists with the name: \"/192-168-42-198:8443/developer\".", "stderr_lines": ["error: no context exists with the name: \"/192-168-42-198:8443/developer\"."], "stdout": "", "stdout_lines": []}
	to retry, use: --limit @/home/steffen/minishift-up.retry

PLAY RECAP *********************************************************************
localhost                  : ok=43   changed=13   unreachable=0    failed=1   

This is the output of oc config get-contexts:

steffen@tecra-z50:~$ oc config get-contexts
CURRENT   NAME                                         CLUSTER               AUTHINFO                           NAMESPACE
*         minishift                                    192-168-42-198:8443   developer/192-168-42-198:8443      myproject
          myproject/192-168-42-198:8443/developer      192-168-42-198:8443   developer/192-168-42-198:8443      myproject
          myproject/192-168-42-198:8443/system:admin   192-168-42-198:8443   system:admin/192-168-42-198:8443   myproject

Looks to me that the contexts are simply named differently, maybe because of a version change?
I'm running Ubuntu 18.04, Ansible 2.7.0 and Docker 18.06.1-ce
Cheers,

Steffen

"Group libvirtd does not exist"

Im trying to run, but it fails, on Ubuntu 16.10, with the following:

PLAY [Install minishift] *******************************************************

TASK [setup] *******************************************************************
ok: [localhost]

TASK [chouseknecht.minishift-up-role : Install Docker machine driver] **********
included: /etc/ansible/roles/chouseknecht.minishift-up-role/tasks/Debian_driver.yml for localhost

TASK [chouseknecht.minishift-up-role : Downlodad the KVM driver] ***************
changed: [localhost]

TASK [chouseknecht.minishift-up-role : Install packages] ***********************
changed: [localhost] => (item=[u'libvirt-bin', u'qemu-kvm'])

TASK [chouseknecht.minishift-up-role : Get current user] ***********************
changed: [localhost]

TASK [chouseknecht.minishift-up-role : Add current uer to libvirtd group] ******
fatal: [localhost]: FAILED! => {"changed": false, "failed": true, "msg": "Group libvirtd does not exist"}

NO MORE HOSTS LEFT *************************************************************
 [WARNING]: Could not create retry file 'minishift-up.retry'.         [Errno 2] No such file or directory: ''


PLAY RECAP *********************************************************************
localhost                  : ok=5    changed=3    unreachable=0    failed=1   

On Ubuntu 16.04 you have to manually start the Libvirt default network.

The playbook kept failing on me for some reason.

TASK [chouseknecht.minishift-up-role : Set latest_version] ************************************************************************************************
fatal: [localhost]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: No last item, sequence was empty.\n\nThe error appears to have been in '/home/username/.ansible/roles/chouseknecht.minishift-up-role/tasks/copy_oc_client.yml': line 11, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: Set latest_version\n  ^ here\n\nexception type: <class 'ansible.errors.AnsibleUndefinedVariable'>\nexception: No last item, sequence was empty."}
    to retry, use: --limit @/home/username/minishiftup.retry

PLAY RECAP ************************************************************************************************************************************************
localhost                  : ok=39   changed=13   unreachable=0    failed=1 

After a bit of digging around, I figured out that minishift was failing to start due to the Libvirt default network also not being started.

minishift start                                                   
-- Starting profile 'minishift'
-- Checking if requested hypervisor 'kvm' is supported on this platform ... OK
-- Checking if KVM driver is installed ... 
   Driver is available at /usr/local/bin/docker-machine-driver-kvm ... 
   Checking driver binary is executable ... OK
-- Checking if Libvirt is installed ... OK
-- Checking if Libvirt default network is present ... FAIL
   See the 'Setting Up the Driver Plug-in' topic (https://docs.openshift.org/latest/minishift/getting-started/setting-up-driver-plugin.html) for more information

That caused the set latest_version task to fail since the $HOME/.minishift/cache/oc path was empty.

After I manually ran sudo virsh net-start default and minishift start, the playbook started working.

I have not tested this on any other system, nor am I positive it is repeatable. I just wanted to leave this topic out there in case someone else has a similar issue.

Login as system:admin fails

Cmd

ansible-playbook -i inventory --ask-sudo-pass minishift-up.yml

Error

TASK [chouseknecht.minishift-up-role : Deleting minishift] *********************
changed: [localhost]

TASK [chouseknecht.minishift-up-role : Remove ~/.minishift] ********************
changed: [localhost]

TASK [chouseknecht.minishift-up-role : Run minishift] **************************
changed: [localhost]

TASK [chouseknecht.minishift-up-role : Login as system:admin] ******************
fatal: [localhost]: FAILED! => {"changed": false, "cmd": "oc login -u system:admin", "failed": true, "msg": "[Errno 2] No such file or directory", "rc": 2}

NO MORE HOSTS LEFT *************************************************************
 [WARNING]: Could not create retry file 'minishift-up.retry'.         [Errno 2] No such file or directory: ''


PLAY RECAP *********************************************************************
localhost                  : ok=28   changed=9    unreachable=0    failed=1   

Compatible with Ansible 2.3.x

Unfortunately I cannot use this role with Ansible 2.3.x in OSX.
Ansible 2.4 is nor available in Pip.

$ pip list --format=columns | grep -e ansible -e Jinja
ansible           2.3.2.0
Jinja2            2.9.6

The problem is related to include_tasks, I've changed it to include and worked. Now I'm facing other problem when creating the route by using previously copied oc in /usr/local/bin/. I had to tweak the copy_oc_client.yml, specifically this:

- name: Copy oc client
  copy:
    src: "{{ latest_version.path }}/oc"
    dest: "{{ openshift_client_dest }}/oc"
    remote_src: yes
    mode: 0755
#  become: yes
#  become_user: root

Finally, I had this error:

TASK [/Users/Chilcano/1github-repo/houseknecht/minishift-up-role : Create the route] *********************************************************************************************************************************************
fatal: [localhost]: FAILED! => {"changed": true, "cmd": ["oc", "create", "-f", "route.yml"], "delta": "0:00:00.115770", "end": "2017-09-07 11:35:33.178153", "failed": true, "rc": 1, "start": "2017-09-07 11:35:33.062383", "stderr": "error: Missing or incomplete configuration info.  Please login or point to an existing, complete config file:\n\n  1. Via the command-line flag --config\n  2. Via the KUBECONFIG environment variable\n  3. In your home directory as ~/.kube/config\n\nTo view or setup config directly use the 'config' command.", "stderr_lines": ["error: Missing or incomplete configuration info.  Please login or point to an existing, complete config file:", "", "  1. Via the command-line flag --config", "  2. Via the KUBECONFIG environment variable", "  3. In your home directory as ~/.kube/config", "", "To view or setup config directly use the 'config' command."], "stdout": "", "stdout_lines": []}

Any idea?
Regards.

minishift using ansible

I'am trying to install minshift using ansible role but i am facing this problem, who can help me plz
iiiyiyiyiyiy
ree

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.