Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Convert all syndesis bash scripts into single go-lang binary #8762

Open
phantomjinx opened this issue Jun 26, 2020 · 4 comments
Open

Convert all syndesis bash scripts into single go-lang binary #8762

phantomjinx opened this issue Jun 26, 2020 · 4 comments
Assignees
Labels
cat/discussion This issues requires a discussion cat/enhancement Enhancements to existing features and capabilities cat/feature PR label for a new feature Epic Use by ZenHub, typically also for user stories status/never-stale Marker that this issue should not be marked as stale

Comments

@phantomjinx
Copy link
Contributor

Advantages

  • Detecting compile-time errors;
  • Single connection interface to kubernetes platform, using client-go, rather than being concerned with either oc or kubectl;
  • Architectural elements like structs for inter-functional communication;
  • Proper function return typing rather than resorting to eval, global variables or other workarounds;
  • Wait functions built-in and typed return objects from kubernetes-related function calls, eg. kube get secret returns a secret typed object;
  • Sync up with other projects such as camel-k.
  • ...

Disadvantages

  • Compilation requires a binary release;
  • Some command-line actions may not be so readily available inside the go-lang environment (helpful to list them as we go along);
  • Code maintenance will require a knowledge of go (seems to be a requirement anyway going forward)
  • ....
@phantomjinx phantomjinx self-assigned this Jun 26, 2020
@phantomjinx phantomjinx added cat/discussion This issues requires a discussion cat/enhancement Enhancements to existing features and capabilities cat/feature PR label for a new feature labels Jun 26, 2020
@blaggacao
Copy link

blaggacao commented Jul 2, 2020

@phantomjinx you might be able to apply extream leverage to this item by exploring https://skaffold.dev - unless this is not about repo / dev / ops tooling.

@phantomjinx
Copy link
Contributor Author

So thinking a little bit more about this. The scripts can be broken down into categories:

  • Installation
    • crc
    • minikube
    • minishift
    • install: installing to existing cluster regardless
  • Building & Compilation
    • build
  • Development Environment
    • completion: changes the completion of local CLI (does anyone use this?)
    • kube: convenience functions wrapping kubectl
    • ui: convenience functions for only bringing up the UI
    • kamel: convenience functions for interacting with camel-k
    • dev: set of miscellaneous development functions, eg. port-forwarding, flushing pvs, updating versions
  • Testing & Deployment
    • system-test
    • integration-test
    • release

To me, this looks like 2 distinct groups, ie. user installation & development.

  1. User installation:
  • Requires download of binaries, configuration of resources, multiple calls to the same commands with different user-requested parameters. Could these scripts be pushed into the syndesis-operator binary, which then becomes the single point of installation?
  1. Development:
  • Wraps common processes, interacts with different binaries, produces artifacts, uploads changes, triggers testing environments. Could these scripts be superceded by some existing managed environment, such as skaffold.dev?

@phantomjinx
Copy link
Contributor Author

Related to #6997

@blaggacao
Copy link

blaggacao commented Jul 2, 2020

It looks like skaffold.dev could also provide installation procedures.
See how it can act aproriately upon certain context heuristics (local or remote):

To absolutely nail dev experience, I can strongly recommend a shell.nix file which could provide appropriate (pinned) versions of minikube / minishift , kamel & kubectl upon running nix-shell.

I could help with that since I'm currently setting up repo tooling at our place this way.

@phantomjinx phantomjinx added status/never-stale Marker that this issue should not be marked as stale Epic Use by ZenHub, typically also for user stories labels Jul 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cat/discussion This issues requires a discussion cat/enhancement Enhancements to existing features and capabilities cat/feature PR label for a new feature Epic Use by ZenHub, typically also for user stories status/never-stale Marker that this issue should not be marked as stale
Projects
None yet
Development

No branches or pull requests

2 participants