redhat-nfvpe / base-infra-bootstrap Goto Github PK
View Code? Open in Web Editor NEWGeneric node bootstrap for virtual KVM or baremetal
License: Apache License 2.0
Generic node bootstrap for virtual KVM or baremetal
License: Apache License 2.0
In example inventories, such as this example atomic inventory there's the use of:
openshift_image_tag=latest
Leif says:
just use
openshift_release=v3.9
now
The current documentation and even the project name make it hard to understand exactly what this does and who is the target audience. "Virtual and baremetal system bootstrap using Ansible" is unclear -- what kind of "system"? what are the initial assumptions? Perhaps a lengthier opening paragraph could help. Here's a suggestion:
Ansible playbooks to prepare for installation of OpenShift on a variety of bare metal and virtual machine configurations. These playbooks provide a crucial initial step before running the openshift-ansible playbooks.
Need to update the readme (which is a disaster right now), plus blog post to show better inventory scheme, basically just "copy this in, and edit these key things"
In order to get OpenShift 3.9 environment up and running with all the service catalogs, it looks like it needs to support the installation of some NFS configuration. This is only possible on a CentOS distribution (vs Atomic) so adding the ability to control, per virtual machine, the distribution type, will allow us to satisfy this dependency.
Using the Atomic image for an OpenShift deployment works great, right up to the point that you want to actually do something with it :)
The default /dev/atomicos/root
disk is only 3GB. We'll need to add some plays or modify the spinup
script to adjust the size of the root disk.
https://gist.github.com/leifmadsen/c0624f3f3ee0a43bff8a32b00ba4592c
From Leif:
TASK [openshift_master_certificates : Generate the loopback master client config] *************************************
Friday 27 July 2018 11:51:54 -0400 (0:00:03.523) 0:11:06.691 ***********
changed: [openshift-master-1 -> openshift-master-1.nfvpe.site] => (item=openshift-master-2)
changed: [openshift-master-1 -> openshift-master-1.nfvpe.site] => (item=openshift-master-3)
ERROR! |failed expects hostvars is a dict
More information in: https://gist.github.com/leifmadsen/e91a143655fbb3baabacfac539f307b2
There are a few spots where we can refactor the use of package
and with_items
to make installation a bit easier and faster.
As reported by Frank:
TASK [openshift-ansible-bootstrap : Create physical volume] *******************************************************************************************************************************************************
fatal: [openshift-master]: FAILED! => {"msg": "The conditional check 'vm_disk_device not in pv_list.stdout' failed. The error was: error while evaluating conditional (vm_disk_device not in pv_list.stdout): Unable to look up a name or access an attribute in template string ({% if vm_disk_device not in pv_list.stdout %} True {% else %} False {% endif %}).\nMake sure your variable name does not
contain invalid characters like '-': coercing to Unicode: need string or buffer, StrictUndefined found\n\nThe error appears to have been in '/home/remote/fzdarsky/repos/github.com_redhat-nfvpe_base-infra-bootstrap/roles/openshift-ansible-bootstrap/tasks/centos.yml': line 49, column 7, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n
Also provided example inventory
Using this command:
ansible-playbook -i ./inventory/vms.local.generated -v bootstrap.yml
I took a further look and was able to replicate -- may be related to the change out from the embedded VM spinup role to the inclusion of the galaxy role.
There's some confusion about how to use them, there's too many and they're named poorly.
Against a CentOS 7.5 host I found that in the pre-tasks for virt-host-setup.yml
there's a complaint that it can't find the python36
package. Wondering if this is related to changes with Python in recent CentOS releases. Potentially can just ignore error, but, wanted to note the issue.
ansible-playbook -i inventory/virthost.inventory virt-host-setup.yml
PLAY [virthosts] ****************************************************************************************************************************************************************************************************************************
TASK [Gathering Facts] **********************************************************************************************************************************************************************************************************************
ok: [virt_host]
TASK [Install python36 on virt host] ********************************************************************************************************************************************************************************************************
fatal: [virt_host]: FAILED! => {"changed": false, "msg": "No package matching 'python36' found available, installed or updated", "rc": 126, "results": ["No package matching 'python36' found available, installed or updated"]}
Add the git
package to the package requirements list.
VM spinup role is looking for a ../
relative path in order to place the dynamic inventories, but, since this does not yet have a ./playbooks/
structure, it can't quite find it.
I think the fix here is actually to update this playbook to match that structure.
Filed here for tracking, I'll submit a PR for it.
need to replace with system_default_cpus/system_default_ram_mb to match with vm-spinup.
I have a lab situation where it would be really nice if I could just assign a static_ip
value to the inventory items.
I've prototyped out some cloud-init
stuff, and it seems to work. I need to add it all to Ansible and provide something that can be done dynamically.
Frank has reported that during his cluster deployment, he doesn't have a service catalog.
This includes with the inclusion of the variable set as such:
openshift_enable_service_catalog=true
Need to circle back around and see how to make sure that gets spun up. Haven't looked at this since some work trying to get APBs up and running and definitely ran into some issues at that time.
When the host system restarts, the virtual machines created with base-infra-bootstrap do no automatically start back up. We should make that an option, and default to yes (start on boot).
Leif ideates:
we should build a few examples... one for an "all-in-one", a 1 master+2 node, 1 master+2 node+3 storage, etc
I met the following failure in openshift-ansible based on inventory/example_openshift-ansible/vanilla.inventory
file.
Condition:
Failure logs:
# ansible-playbook -i ./inventory/test1 playbooks/deploy_cluster.yml
(snip)
TASK [openshift_master : Ensure that Template Service Broker has nodes to run on] *********************************
Friday 02 March 2018 06:53:29 -0500 (0:00:00.526) 0:05:51.353 **********
fatal: [openshift-master]: FAILED! => {"msg": "Unexpected templating type error occurred on ({{ __schedulable_nodes_matching_selector['results']['results'][0]['items'] | default([]) | length != 0 }}): object of type 'builtin_function_or_method' has no len()"}
Adding following config in inventory, playbooks/deploy_cluster.yml
works fine.
openshift_enable_service_catalog=false
template_service_broker_install=false
Did you see such issue?
or how about to add above config in our inventory/example_openshift-ansible/vanilla.inventory
?
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.