Code Monkey home page Code Monkey logo

ansible-collection.core's Introduction

Ansible Collection for Red Hat Advanced Cluster Management for Kubernetes Integration

This collection includes modules and plugins for driving Red Hat Advanced Cluster Management for Kubernetes functionality from Ansible Playbooks.

Prerequisites

Before using this collection, install compatible versions of Red Hat Advanced Cluster Management for Kubernetes and Ansible (or Ansible Automation Platform). Review the following documentation for more information.

Red Hat Advanced Cluster Management for Kubernetes version compatibility

Tested with Red Hat Advanced Cluster Management for Kubernetes version 2.5. All versions before 2.5 are not supported.

Ansible version compatibility

Tested with stable versions of Ansible 2.10, Ansible 2.11, and Ansible 2.12. Ansible versions before 2.10 are not supported.

Python support

Tested with Python 3.6, Python 3.7, Python 3.8, and Python 3.9. Python versions before 3.6 are not supported.

Prepping your Red Hat Advanced Cluster Management for Kubernetes Hub cluster

Prior to using this collection, include the following configuration updates on your Hub cluster:

Included content

Name Description
stolostron.core.cluster_proxy Install the cluster proxy on a managedcluster, and get proxy url from the addon. cluster-admin permission on hub is assumed to enable the plugin.
stolostron.core.managed_serviceaccount_rbac Use the managed-serviceaccount RBAC to setup a serviceaccount on a managedcluster with the specified RBAC permission.
stolostron.core.managed_serviceaccount Use the managed-serviceaccount to setup a serviceaccount on a managedcluster, and return the serviceaccount token.
stolostron.core.managedcluster_addon Use managedcluster_addon to enable/disable an addon on a managedcluster.
stolostron.core.ocm_managedcluster Fetch ocm managedclusters, and group clusters by labels. Hub cluster information will be stored in the "hub" group.
stolostron.core.cluster_management_addon Use cluster_management_addon to enable/disable a feature on the hub. Users can only install an addon on managed clusters if the feature of that addon is enabled. This plugin will need access to the Multicloudhub CR, and it enables/disables available features by updating the corresponding fields in the CR.

Installation and Usage

Installing the Collection from Ansible Galaxy

Before using the stolostron.core collection, you need to install it with the Ansible Galaxy CLI:

ansible-galaxy collection install stolostron.core

You can also include it in a requirements.yml file and install it via ansible-galaxy collection install -r requirements.yml, using the format:

---
collections:
  - name: stolostron.core

Using the stolostron.core Collection in your playbooks

It's preferable to use content in this collection using their Fully Qualified Collection Namespace (FQCN), for example stolostron.core.cluster_proxy:

---
- hosts: "{{ target_hosts }}"
  connection: local

tasks:
- name: "Get ClusterProxy URL for {{ hostvars[inventory_hostname].cluster_name }}"
  stolostron.core.cluster_proxy:
    hub_kubeconfig: "{{ hostvars['local-cluster'].kubeconfig }}"
    managed_cluster: "{{ hostvars[inventory_hostname].cluster_name }}"
    wait: True
    timeout: 60
  register: cluster_proxy_url

For documentation on how to use individual modules and other content included in this collection, please see the links in the 'Included content' section earlier in this README.

A robust example utilizing the stolostron.core collection is available in the acm-ansible-collection-demo GitHub repository.

Development

If you want to develop new content for this collection or improve what's already here, the easiest way to work on the collection is to clone it into one of the configured COLLECTIONS_PATHS, and work on it there.

Testing

The tests directory contains configuration for running sanity, unit, and integration tests using ansible-test.

For more information, see the Testing README.

Contributing to this collection

See Contributing to stolostron.core.

Release Notes

See the changelog.

More information

For more information, join the #forum-acm-devops-wg channel on Slack.

License

Licensed under the Apache License, Version 2.0.

See LICENSE for full text.

ansible-collection.core's People

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.