Comments (9)
If this is meant to be just a brainstorming thread, I don't like the idea of
python/golang/perl/whatever. Either POSIX shell should be used or BASH (as
those are widely available in most of the images around).
If that is not suitable, having pre-compiled C program would be also OK.
from cct.
In case of pre-compiled binary ("almost" without dependencies), it does not matter
what language will be chosen. The point is to not add unnecessary run-time
requirements.
from cct.
Yes, issues marked with discussion label are meant to be brainstorming threads.
We want to go as far away as we can from Bash/shell. In fact this is exactly the reason to create this tool. We already maintain a lot of custom shell scripts to apply modifications to our containers. This becomes a nightmare to maintain. Another thing is that it's very complicated to do some things (XML modifications) in a stable way.
C is pretty low-level. We can get same thing with golang. As a bonus we get static linking for free.
from cct.
We want to go as far away as we can from Bash/shell. In fact this is
exactly the reason to create this tool. We already maintain a lot of
custom shell scripts to apply modifications to our containers. This
becomes a nightmare to maintain.
Not really. Even shell scripting allows you to do maintainable, modular
and very portable software.
Another thing is that it's very complicated to do some things (XML
modifications) in a stable way.
Hmm. Yes, if some complicated stuff is really needed, additional
requirement makes sense.
C is pretty low-level. We can get same thing with golang.
Agreed.
As a bonus we get static linking for free.
This is not benefit. The static linking is maintenance nightmare and I
personally don't like golang for that. But yeah that is just IMHO.
from cct.
Hmm. Yes, if some complicated stuff is really needed, additional
requirement makes sense.
By that ^^ I mean that we could avoid additional "default" requirements pretty
easily and I see no benefits in "avoiding shell scripting" target. Except the
performance - but performance POV is also kind of optional, or?
from cct.
@praiskup
the main benefit of not using shell script is that tool can be easily covered by unit tests, versioned and it also will be more consistent with lesser effort. This is so hard with custom shell scripts. you know its bug difference to write a scripts which configure one application and complete configuration framework - I know all is possible in BASH but I had maintained bash scripts which implemented !!!LDAP!!! protocol and it was a nightmare so bash is great for small specific scripts but i don't like it for more general tools
And also almost no ecosystem like static analyzes, testing framework, mocking, test coverage tool doesn't exist or are not much in use in BASH ecosystem.
And to static linking - I'm not big fun of it either - BUT it is really good in a containers world, especially for stuff like this because you will get single binary which can run in almost any container and can be easily replaced and the HUGE benefit is that update of any library in container will not hit your tool - so in the layered containers is static linking for some tools really beneficial.
from cct.
Also my comment to language selection. I would love to see something like golang "runner" which will spawn language independent modules and will communicate with them via some very lightweight easily implementable RPC mechanism like 9p. In that way you;ll get:
- robust and stable runner
- great set of basic modules
- easy way to implement your modules in almost any language
from cct.
+1 to the previous comment.
I am not a big fan of go either:) (Seems like no one likes it, but still it's user base id getting bigger every day:) but the static linking is a great think for containers as @l-d-j said.
We should solve problems systematically which, I think, shell scripts do not support very well - first problems I was pointing out for containers were that we migrated from initscripts to systemd units, and it was a lot of work, and now we are going to start services in containers with sort of initscripts again..but less structured, more custom...not the best way to go.
from cct.
CCT now support python2/3 + bash for modules. its basically decided
from cct.
Related Issues (20)
- misleading errors at build-time due to module scanner
- Pykwalify and logging levels HOT 1
- Remove dummy module causing No such file or directory DEBUG messages
- Show bash command output if any, when debug enabled HOT 2
- Make it possible to add environment variables and labels as part of module.yaml HOT 7
- Release module as part of CCT release HOT 3
- CCT report modules as NotRun HOT 1
- Enable script modules to use any language
- update artifacts fetching to be synced with dogen approach
- revisit module.yaml syntax
- Remove bash module
- If change yaml file request module which doesn't exists it fail quietly HOT 1
- Remove old and outdated samples HOT 1
- Fix python module names to comply with script ones
- CCT_MODULE_PATH variable is wrongly set in script modules
- remove run from excluded module methods.
- CCT configuration in YAML should be validated HOT 1
- Cache modules locally for faster building HOT 1
- Make it easy to locally develop CCT modules HOT 1
- modules should be cloned with -b and --depth 1 options HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cct.