Giter Site home page Giter Site logo

npearce / cac-github_webhook_server Goto Github PK

View Code? Open in Web Editor NEW
14.0 12.0 5.0 6.29 MB

Automated Network Configuration-as-Code (NCaC) deployments using Github webhook to F5 BIG-IP.

Home Page: https://redtalks.live/cac/

License: MIT License

JavaScript 100.00%
webhook-server github-webhooks infrastructure configuration-as-code

cac-github_webhook_server's Introduction

Hi there ๐Ÿ‘‹

This is where I keep personal projects. However, my work on Infrastructure as Code can be found in my REDtalks.live GitHub account, which you can find here: https://github.com/REDtalks

cac-github_webhook_server's People

Contributors

npearce avatar

Stargazers

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

Watchers

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

cac-github_webhook_server's Issues

Add example callback curl command

Add access verification example command to setup documentation:

curl -v -k -X GET https://ip-172-31-1-200.us-west-1.compute.internal/api/v3/ -H 'Authorization: Token {your_token}' -H 'cache-control: no-cache'

Generate webhook auth token for GitHub Webhook Auth

Currently using:
https://username:password@bigip_mgmt_ip/shared/webhook/github-listener

This can cause problems for passwords with special characters.

Propose adding 'token' generator feature to the webhook server as alternative to user:pass in URL string.

Improve AS3 to use IP Addressing Discovery

Currently IP addressing must be statically defined for single site use case with AS3 and Webhook (1 to 1 mapping between repo and BIG-IP). CAC specifies IP addresses to be used by the BIG-IP for configuration of components and there is no concept of which environment or site-specific values to enable code/repo reuse.

In regards to DR (where two distinct environments are referencing CAC) IP addressing my NOT overlap, and be unique. Creating a variable or reference mechanism within the repo based on different environments, allows for multiple environments to co-exist while leveraging the same Git repo.

Proposing:
AS3 should be able to pull from a IP Address file (environment dependant) such as GCP or AWS IP Addressing DB's, Git repo or external IPAM DB/dynamic source (future).

If references can be used instead such as {{ vip }} and then based on which BIG-IP the request comes from, populate that address, these would add the correct IP addressing values for different components deployed in different environments.

Validate Ghe Connectivity in getSettings()

Verify that we have the right settings in the webhook server, perform an access check to the BIG-IP's repo.

Maybe use octokit.repo.getShaOfCommitRef(owner, repo, ref) to ensure access to the repo?

This will execute every time the settings are changed, and every time a webhook message is received, so we can fail, and createIssue() if no access to repo.

Requires #35

Improve AS3 Service Definition validation

Currently only checking for 'action':

if (typeof service_def.action !== undefined && service_def.action === 'deploy' || service_def.action === 'dry-run') {

Proposed verification of 'action' and 'declaration.class' before proceeding:

if (typeof service_def.action !== undefined && typeof service_def.declaration.class !== undefined && service_def.declaration.class === 'ADC' && service_def.action === 'deploy' || service_def.action === 'dry-run') {

Add Declaration URI rewrite for referenced policies

AS3 support pulling policing in via URI, e.g. a WAF policy or an iRule:

"Maintenance_iRule": {
    "class": "iRule",
    "iRule": {
        "url": "https://webserver.com/irule/maintenance-page.irule"
    }
}

Need to support URL rewrite option to fetch objects from {{source_repo}}:
https://{{source_repo}}/maintenance-page.irule

Implement Declaration Queuing

If operator commits several complex service definitions together we can overwhelm AS3. Implement queuing to spoon feed the service definitions to AS3.

406 error from getServiceDefinition()

When I attempt to send your example declaration in 1a.AS3-EXAMPLE-Basic_L4_LB.json from my GHE repo to my BIG-IP, I get the following error:

info: [GheListener - ERROR] - getServiceDefinition(): {"code":406,"message":" "}

I don't get any other information, despite debug being enabled, and no issues were created in the repo for reference. Any thoughts @npearce ?

CreateIssue: add link to commit

Add a link to the Service Definition 'commit' in the results 'Issue'.

The URL to the commit is provided in the Webhook message.

Add 'DEBUG' mode

  1. Decide which "logger.info" statements should be for DEBUG mode.
  2. Add support for { options.debug: true } to persisted state.
  3. Make configurable through 'PUT' and visible through 'GET'.

Automate the creation of GitHub Enterprise eval server

Document the process to spin up a new GitHub Enterprise eval service, license it (45-day eval license), and provision it with:

  • webhook configration
  • user account for webhook server callback to deployment repo
  • creation of service template examples

Improve error handling

Send bad VIP Address to AS3, error response is not captured and sent to Github Issue...

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.