Skip to content

Instantly share code, notes, and snippets.

@farhadkzm
Created August 18, 2021 02:57
Show Gist options
  • Save farhadkzm/53234bb642ae2820a7f6809b8e8bdbc1 to your computer and use it in GitHub Desktop.
Save farhadkzm/53234bb642ae2820a7f6809b8e8bdbc1 to your computer and use it in GitHub Desktop.
CICD as Product
CLI
- Main function: Bootstrap projects with the given tech stack
- Architecture: Requirements of the tool
- Plugin-based Architecture:
- Functionalities can be added to the cli mostly without touching/breaking other parts of it
- A plugin adds one command and possibly many sub-commands
- A plugin comes with documentation for its command and subcommands so user can realise how to use it
- A plugin provides required questions/inputs so user can enter via console
- A plugin can support connecting to its target resource (e.g. CI Server) to configure it automatically or generate configs to be manually applied by users
- Supported platforms: Linux, Windows, Mac as an executable file
- Input sources: YAML and console (Interactive)
- User writes a YAML file to define the tech stack and required configs
- User can also enter the same data in Yaml via console in an interactive way
- The pipeline that builds and publishes the CLI is generated by the tool itself
- Generated configs/code should be predictable so running the tool multiple times produces the same artefacts with no changes
- Plugins
- scaffolding
- Serverless (Lambda)
- Injected Capabilities: monitoring, logging, .. (TBD)
- Code: Unit test, local simulator, … (TBD)
- Languages: Java, Python (v2)
- Tech: Terraform, CFN
- Server (Kubernetes)
- Injected Capabilities: monitoring, logging, security, … (TBD)
- Code: Unit test, Helm Chart, local container, service mesh(v2)… (TBD)
- Languages: Java
- Tech: CFN(EKS)
- UI (React)
- Injected Capabilities: (TBD)
- Code: Unit test, local run, … (TBD)
- Tech: Terraform, CFN
- Pipeline
- Steps: Build, Test, Scan (Security scanners), Publish, Deploy
- Tech: CodeBuild and CodeDeploy, Jenkins
- Languages: Java
- Goals:
- I can set up a CICD pipeline and a hello-world lambda/K8S container in 5min
- I update the CLI and it smoothly updates the existing code/configs (i.e. no breaking changes)
CICD Library
- Main function: Integrates with third-party tools to provide traceability/visibility
- Architecture:
- Plugin-based architecture so plugin can register themselves to be called at certain points during CICD pipeline execution
- Provides the following integrations:
- Wiki: Update wiki pages so users (mostly non-tech users) know what/when/who deployed along with other relevant details
- Supports: Confluence
- Messaging platform: Informs users of what matters (Failure/Deployment messages)
- Supports: (TBD)
Server
- Main function: Provides a unified UI across various tech stacks so users can view certain details or do some operations in a consistent way
- Details: TBD
-
Scenario:
>= curl -LO https://cidio.io/release/v0.0.1/linux/cidio
>= mv cidio /usr/local/bin/cidio
>= chmod +x cidio
>= mkdir lambda_test; cd lambda_test
>= cidio init
> Welcome to cidio, the tool that saves you hundreds of hours!
>= Choose the technology: [serverless|server|ui]: serverless
>= Choose the platform: [aws-lambda]: aws-lambda
>= Choose the language: [java]: java
>= Choose the IaC: [terraform|cloudformation]: terraform
>= Choose the CI server: [jenkins|aws-codebuild]:aws-codebuild
>= Choose the CD server: [jenkins|aws-codedeploy]: aws-codedeploy
>= Choose the capabilities:[monitoring, logging, tracing]: monitoring, tracing
>= Do you need integration with Wiki and Messaging platform: [yes|no] yes
> Initialising your project ...
> Documenation is available on https://docs.cidio.io/aws-lambda
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment