These are chat archives for azukiapp/azk

7th
May 2015
Gullit Miranda
@gullitmiranda
May 07 2015 00:07
@slobo
You can put the sqitch within aprovision, disable command and disabletimeout
Slobodan Mišković
@slobo
May 07 2015 00:08
command: false?
Gullit Miranda
@gullitmiranda
May 07 2015 00:08
just a moment, I am preparing an example.
ex:
systems({
  sqitch: {
    depends: ["database"],
    image: {"docker": "sqitch"},
    provision: [
      "sqitch deploy --target=$DATABASE_URI",
    ],
    command: "echo 'sqitch'",
    shell: "/bin/bash",
    wait: false,
    scalable: {"default": 0, limit: 1},
  },
});
Slobodan Mišković
@slobo
May 07 2015 00:13
thanks, makes sense. What happens to the echo command, is it shown in the log?
Gullit Miranda
@gullitmiranda
May 07 2015 00:14
nothing.
By default the sqitch will not start because ofscalable.default = 1, but u can change. To provision the application u can:
azk start -R sqitch; azk stop sqitch
Slobodan Mišković
@slobo
May 07 2015 00:15
awsome, that will work great
Gullit Miranda
@gullitmiranda
May 07 2015 00:15
I put the echo command only to ensure that the 'CMD` the Dockerfile will not run.
Felipe Arenales Santos
@fearenales
May 07 2015 00:16
very clever, @gullitmiranda !
Gullit Miranda
@gullitmiranda
May 07 2015 00:18
tks =D
Slobodan Mišković
@slobo
May 07 2015 05:55
is there a way to override the user with which container / provision commands are run if Dockerfile includes USER?
Slobodan Mišković
@slobo
May 07 2015 06:01
alternatively, can I mount a persistent folder with different permissions? Iooking at the source I see persistent(name, options = {}), but what are the options it takes?
Gullit Miranda
@gullitmiranda
May 07 2015 13:11
@slobo
  1. azukiapp/azk#352
  1. For now it can not even why everything is inside the container root. Permissions (eg, execute permission) is maintained within the container.
The options was being used to enable change the type of file sharing to VBox, which is now the standard.
Slobodan Mišković
@slobo
May 07 2015 16:48

I may be missing something, but:

solr: {
    image: { docker: "guywithnose/solr:4.4.0" },
    provision: ['whoami',]
     ///...
}

Ends up printing solr, since the base Dockerfile has USER solr in it.

I can always make a new Dockerfile, but it would be useful to override any docker run parameters. I suspect that docker_extra can be used, but I couldn't find any documentation on how.

Everton Ribeiro
@nuxlli
May 07 2015 18:06
@slobo, the docker not support any way to change the permissions of a drive mapping to create a container
in your case you have two options:
forcing the user with:
docker_extra: {
  // extra docker options
  create: {
    User: "root",
  },
},
Slobodan Mišković
@slobo
May 07 2015 18:08
heh, i tried start: {User and run:{User.
are these documented anywhere?
Everton Ribeiro
@nuxlli
May 07 2015 18:09
the docker_extra is divided into: create (when the container is being created) and start (when it will be started)
unfortunately not yet, mainly because widely support the use of these options, since azk is premised to be agnostic to the container system
Slobodan Mišković
@slobo
May 07 2015 18:11
makes sense to keep 'em hidden then
Everton Ribeiro
@nuxlli
May 07 2015 18:11
:D
this user question is known to us, but we have not found a definitive approach to it
Slobodan Mišković
@slobo
May 07 2015 18:12
out of curiosity, what other containers are considered in the future? BSD jails?
Everton Ribeiro
@nuxlli
May 07 2015 18:13
the main reason is that the very Docker does not have a good solution to issues such as:
  • Change permissions for mapped folders in containers
  • Mapping between users and the host container (something like a table ids)
rsrs, jails, among others, like "container app" (Rocket)
Slobodan Mišković
@slobo
May 07 2015 18:15
one suggestion, since we already have to specify image: { docker:, i would put docker_extra inside the image key to keep them together
Is there a way to get more debugging out of azk? -vv doesn't seem to provide much to the effect of what commands it's trying to execute etc. Is there a debug log somewhere?
Everton Ribeiro
@nuxlli
May 07 2015 18:19
add the docker_extra to images seems to me an interesting option that suits our idea of ​​separating the images declaration on an extra point off the systems statement, something like: image ('my_image', { docker: //... });
Slobodan Mišković
@slobo
May 07 2015 18:20
or even image: docker('php:53', {create: { User: 'root'{})
to keep it similar to path() and persistent()
Everton Ribeiro
@nuxlli
May 07 2015 18:21
you are right, -vv does not yet offer all the power you want, the azk --log=debug start ... should offer something closer to what you are searching for (at least hourly)
yes, that would be "DSL"
Slobodan Mišković
@slobo
May 07 2015 18:23
--log=debug gives more events that are happening, but getting closer :smile:
Everton Ribeiro
@nuxlli
May 07 2015 18:25
rsrs
we are currently working on an internal improvement in the way azk code behaves as the events that can be logged or displayed in a verbose mode: azukiapp/azk#385
after this change will be able to improve the verbose
finally the idea is to change the system logs to use "syslog"
Slobodan Mišković
@slobo
May 07 2015 18:32
sounds promissing :D
Slobodan Mišković
@slobo
May 07 2015 18:42
Is there a canonical way to keep Azkfile.js small, like say having
` include('azk/*')
and then i could have azk/system1.js with just the definition of system1 in it. How much javascript is supported/encouraged inside Azkfile.js?
Everton Ribeiro
@nuxlli
May 07 2015 18:45
it's good point, @slobo! we have this already mapped but it's in the backlog yet.
if you could open an issue to that would be great! In this way you can follow the evolution of azk regard this feature
Slobodan Mišković
@slobo
May 07 2015 18:56
#395
Also, is there ability to use CoffeScript? Would be nice since there is less syntactic noise.
Everton Ribeiro
@nuxlli
May 07 2015 19:34
thanks
Everton Ribeiro
@nuxlli
May 07 2015 20:21
As for the CoffeScript: we have plans to add "plugins" support in the azk, it would give the possibility to endure CoffeScript and ES6 directly in Azkfile.js