[Container-tools] DevAssistant + Nulecule

Václav Pavlín vpavlin at redhat.com
Mon May 25 16:25:10 UTC 2015


Hi,

On 25.5.2015 15:19, Tomas Radej wrote:
> Hi, all.
>
>
>
> As promised, I have compiled a list of Nulecule-related workflows that I
> envision should be done with DevAssistant, and I'm putting it here for
> reference and to request comments.
>
>
>
> Since most of the runtime and deployment functionality is implemented in
> the atomicapp [1], which is quite easy to use, it's my intention to
> focus on the manipulation with the app, the spec, and the system
> *before* the Nulecule file gets fed into atomicapp. DevAssistant can
> wrap the atomicapp as well, but I'd do it only if you guys strongly feel
> it should.
>
>
>
> = Creating an App + Installing Dependencies =
>
>
>
> One of DevAssistant's main features is installing dependencies, so
> whatever packages are necessary to install when working with Nulecule
> apps, they will be installed simply by running "da prep nulecule [--url
> URL]", or just creating a new app (DevAssistant will perform the dep
> check automatically). Such packages would probably be "docker-io",
> "python-atomicapp" (once it's packaged), or "kubernetes-devel".
>
>
>
> I already have an early version of the creator functionality [2], which
> creates the basic filesystem layout for the app and fills in values
> provided by the user. It doesn't do most of the dependency 
> installation yet.
>
>
>
> With the latest version of DevAssistant installed (v0.11.x) [3], you can
> run "da pkg install nulecule" to install the assistants, and then "da
> create nulecule -n NAME etc..." to actually create the app. I am
> currently working on compiling a list of dependencies that running this
> command will automatically install on the user's machine. By the way,
> make sure you keep the nulecule package in DevAssistant up to date (by
> running "da pkg update nulecule"), I make changes often.
>
I haven't tried it yet, but have looked at the code and it looks good 
and valuable to me. (I'll definitely try it once my new laptop arrives:) )
>
>
> = Validating an App =
>
>
>
> In addition to that, you can validate the whole app by running "da extra
> nulecule validate" in the app's directory. Not only the main Nulecule
> spec is checked, but so is the filesystem layout. It's simple to add
> more checks in the future.
>
>
>
> The validation assistant makes use of the nulecule_validator lib I wrote
> [4]. This library, of course, can be used on its own too.
>
>
>
> = Adding Deployment Options =
>
>
>
> This functionality is not available yet, but generally, it should work
> as follows: You run "da tweak nulecule add_provider kubernetes
> [--artifacts /path/to/dir/with/k8s/jsons]" in the app's directory, and
> DevAssistant would automatically add kubernetes as a provider to your
> app in the Nulecule file and a) link to existing k8s artifacts; b)
> create some reasonably filled default artifacts and link to those.
>
I think generation of artifacts themselves would be great and would help 
a lot although I am not sure how easy/hard that would be to get 
something really useful out of it.
>
>
> = Adding Graph Components =
>
>
>
> (Also not implemented yet) You'll also be able to add more components to
> the graph by running "da tweak nulecule add_component --name NAME
> [--source URL | --artifacts LIST OF ARTIFACTS SEPARATED BY SPACE]".
This looks good especially with --source - could we add something like 
search so that we f.e. list whatever is in 
https://github.com/kbsingh/cccp-index (once there is anything at all)

Also something like "dat tweak nulecule add_param --name NAME 
--description DESC [--default DEFAULT] [--constraint CONSTRAINT] where 
CONSTRAINTs could be predefined (url, email, numbers...) regular expressions
>
>
>
> I am still not set on the issue if all the possible options should be
> available to the user. After all, they can edit the file themself, so it
> is my guess covering only the most common ones make sense. If the
> assistant covers everything, the user may become overwhelmed by options.
>
We should probably start small and add more once we have some GUI for 
it. Generation of nulecules through UI would be much nicer then writing 
(too) long commands
>
>
> = Other (?) =
>
>
>
> There are certainly more use cases for DevAssistant than I have just
> listed, so I'd like to hear your suggestions, please. DevAssistant can
> manage dependencies, check if stuff is running, run scripts (like shell
> scripts), run more complex, interactive scripts (in Python), wrap other
> programs or libs, etc.
>
>
>
> On the other hand, since it should be the go-to tool for starting
> development with Nulecule apps, it shouldn't be made to be too large or
> too smart for its own good. It's not and IDE, and it shouldn't be
> considered one.
>
>
>
> Thanks, Tomas
>
>
>
> P. S. At the moment, it's pretty hard to run DevAssistant in a
> containerized setup in a user-friendly way. We're working on
> transforming it into a client/server tool so that development on Mac OS,
> Windows, or even other Linux distros be much easier.
>
>
>
> [1] https://github.com/projectatomic/atomicapp
>
> [2] https://github.com/tradej/dap-nulecule - You install this package by
> running "da pkg install nulecule" in DevAssistant versions 0.11.x
>
> [3] This version is available in Fedora 22 beta or in Rawhide. You will
> probably not be able to run the nulecule commands with older versions 
> of DA.
>
> [4] https://github.com/tradej/nulecule_validator
>
>
>
> _______________________________________________
>
> Container-tools mailing list
>
> Container-tools at redhat.com
>
> https://www.redhat.com/mailman/listinfo/container-tools
>
>
>
Cheers,
Vašek

-- 

Lead Infrastructure Engineer
Developer Experience
Brno, Czech Republic
Phone: +420 739 666 824





More information about the Container-tools mailing list