Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Gullit Miranda
    @gullitmiranda

    I believe @fearenales can help you with this, since he did some things like preparing the build azk.

    We have discussed about adding a --json option for AZK stauts but this issue was not registered. He will be able registers it the he thinks it shouldnt be?

    Felipe Arenales Santos
    @fearenales
    @slobo please check if @heitortsergent 's solution works for you. In your case, I think it will.
    But you're right, I don't think we have a proper way to get env vars. Would you mind to open an issue at Github reporting this?
    Slobodan Mišković
    @slobo
    @heitortsergent ok, getting somewhere. looking at the output tho i see some but not all env variables that are available in containers.
    ex, i see stuff from mysql system, but not from say my postgres system.
    and actually port information is available in MYSQL_DATA_PORT so that's great
    ah, I see, it decided to run in the first system it found.
    So I would have to execute azk shell in whatever system would have the vars. I suppose that will solve my immediate issue.
    Slobodan Mišković
    @slobo
    posted #394
    Felipe Arenales Santos
    @fearenales
    great, @slobo ! Good to hear the solution worked for you and thank you very much for your support!
    Slobodan Mišković
    @slobo
    very excited about azk. My only complaint is that I didn't find out about it until after I spent a weekend trying to mess with a giant Dockerfile :)
    Felipe Arenales Santos
    @fearenales
    we're sorry! haha :P
    It's great to have support from the community!
    Slobodan Mišković
    @slobo

    Are there any downsides to specifying systems that are not meant to be running?
    Ex, I use sqitch do manage database configuration changes, but I don't want to install it locally. Instead I just define a system that points to an image on docker registry, register some depends on a database system, and then use it via
    azk shell sqitch -c "sqitch deploy" --target=\$DATABASE_URI

    Is this a supported thing, or it just happens to work and might cause some issues?

    Felipe Arenales Santos
    @fearenales
    I think it's perfectly ok. Even you don't running it, you're using it in some way.
    @gullitmiranda in the @slobo 's case, could he put the sqitch command in the Azkfile.js (provision or shell section) so that run when the system started? Does it would make things easier for you, @slobo ?
    Slobodan Mišković
    @slobo
    In this case I want to control when I run it - when developing database changes I run it lots of times till I'm happy with the changes. But yes, maybe useful when doing azk restart to migrate the database anyways so other devs don't forget
    Is it true that shell section in Azkfile.js only takes full path, and we can't specify arguments to the shell?
    Gullit Miranda
    @gullitmiranda
    @slobo
    You can put the sqitch within aprovision, disable command and disabletimeout
    Slobodan Mišković
    @slobo
    command: false?
    Gullit Miranda
    @gullitmiranda
    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
    thanks, makes sense. What happens to the echo command, is it shown in the log?
    Gullit Miranda
    @gullitmiranda
    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
    awsome, that will work great
    Gullit Miranda
    @gullitmiranda
    I put the echo command only to ensure that the 'CMD` the Dockerfile will not run.
    Felipe Arenales Santos
    @fearenales
    very clever, @gullitmiranda !
    Gullit Miranda
    @gullitmiranda
    tks =D
    Slobodan Mišković
    @slobo
    is there a way to override the user with which container / provision commands are run if Dockerfile includes USER?
    Slobodan Mišković
    @slobo
    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
    @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

    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
    @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
    heh, i tried start: {User and run:{User.
    are these documented anywhere?
    Everton Ribeiro
    @nuxlli
    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
    makes sense to keep 'em hidden then
    Everton Ribeiro
    @nuxlli
    :D
    this user question is known to us, but we have not found a definitive approach to it
    Slobodan Mišković
    @slobo
    out of curiosity, what other containers are considered in the future? BSD jails?
    Everton Ribeiro
    @nuxlli
    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
    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
    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: //... });