Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Felipe Arenales Santos
    @fearenales
    hmm.. one moment
    Felipe Arenales Santos
    @fearenales
    looks like the first sync is being concluded but the watcher is failing to be spawned...
    Slobodan Mišković
    @slobo
    btw, i think i tried similar thing last year with another folder, i still see the leftover dir in /mnt/sda1/azk/sync_folders/d3a4508ee4
    Bartek Kus
    @bartekus

    is there a way to have run server and client from the same folder but using different uri’s? This certainly doesnt work as I’ve found out:

    systems({
      'priim-client': {
        docker_extra: {
          User: 'root',
        },
        depends: ["priim-server"],
        image: {"docker": "azukiapp/node"},
        provision: [
          "npm install -g webpack@2.1.0-beta.4",
          "npm install -g ionic@beta",
          "npm install"
        ],
        workdir: "/azk/#{manifest.dir}",
        shell: "/bin/bash",
        command: ["npm", "start"],
        wait: 200,
        mounts: {
          '/azk/#{manifest.dir}': sync("."),
          '/azk/#{manifest.dir}/node_modules': persistent("./node_modules")
        },
        scalable: {"default": 1},
        http: {
          domains: [
            "#{system.name}.#{azk.default_domain}"
          ]
        },
        ports: {
          // exports global variables
          http: "8100",
        },
        envs: {
          // Make sure that the PORT value is the same as the one
          // in ports/http below, and that it's also the same
          // if you're setting it in a .env file
          PORT: "8100",
        }
      },
    
      'priim-server': {
        docker_extra: {
          User: 'root',
        },
        depends: ["rethinkdb"],
        image: {"docker": "azukiapp/node"},
        provision: [
          "rm -rf node_modules/*",
          "npm install -g webpack@2.1.0-beta.4",
          "npm install -g ionic@beta",
          "npm install"
        ],
        workdir: "/azk/#{manifest.dir}",
        shell: "/bin/bash",
        command: ["npm", "run", "serve"],
        wait: 200,
        mounts: {
          '/azk/#{manifest.dir}': sync("."),
          '/azk/#{manifest.dir}/node_modules': persistent("./node_modules")
        },
        scalable: {"default": 1},
        http: {
          domains: [
            "#{env.HOST_DOMAIN}",
            "#{env.HOST_IP}",
            "#{system.name}.#{azk.default_domain}"
          ]
        },
        ports: {
          // exports global variables
          http: "5000",
        },
        envs: {
          // Make sure that the PORT value is the same as the one
          // in ports/http below, and that it's also the same
          // if you're setting it in a .env file
          PORT: "5000",
        }
      },
    
      rethinkdb: {
        image: { docker: 'rethinkdb' },
        // If you need to expose and bind the rethinkdb ports outside of the docker
        // enable the docker_extra setting below
         docker_extra: {
           HostConfig: {
             'PortBindings': {
               '8080/tcp': [{ 'HostPort': '8080' }],
               '28015/tcp': [{ 'HostPort': '28015' }],
               '29015/tcp': [{ 'HostPort': '29015' }]
             }
           }
         },
        shell: '/bin/bash',
        scalable: false,
        command: "rethinkdb --bind all --direct-io --cache-size 512 --server-name rethinkdb --directory ./rethinkdb --canonical-address rethinkdb.dev.azk.io",
        wait: 75,
        mounts: {
          '/rethinkdb': persistent('rethinkdb-#{manifest.dir}'),
          '/data': persistent('#{system.name}/data')
        },
        ports: {
          http: '8080',
          data: '28015',
          cluster: '29015'
        },
        http: {
          domains: [ '#{system.name}.#{azk.default_domain}' ]
        },
        export_envs: {
          'DATABASE_HOST': '#{net.host}',
          'DATABASE_PORT': '#{net.port.data}',
          'DATABASE_URL': 'rethinkdb://#{net.host}:#{net.port.data}'
        }
      },
    
      deploy: {
        image: {'docker': 'azukiapp/deploy-digitalocean'},
        mounts: {
          '/azk/deploy/src' :    path('.'),
          '/azk/deploy/.ssh':    path('#{env.HOME}/.ssh'),
          '/azk/deploy/.config': persistent('deploy-config')
        },
        envs: {
          REMOTE_HOST:        "192.168.0.77"
        },
        scalable: {'default': 0, 'limit': 0}
      }
    
    });

    Any suggestions?

    Saito
    @saitodisse
    @Bartekus using different uri’s? I did not understand. As they have #{system.name}.#{azk.default_domain} they already have distinct uris.
    if priim-client depends on priim-server maybe you do not need the priim-client sync mount. They are sending files to the same place.
    Bartek Kus
    @bartekus
    @saitodisse that's exactly why I've done it this way, since extend didn't work, but neither is this current setup. But yes, I'd like both server and client use and access the same folder structure, node_modules, etc... but be accessible as separate uri's so that they could be independent restarted if necessary plus be clearly percieved/separated as distinctive subsets of the overall system
    Saito
    @saitodisse
    As they will run in distinct containers, can you try to change the left side: '/azk/#{manifest.dir}': sync("."),
    maybe:
        mounts: {
          '/azk/#{manifest.dir}/#{system.name}': sync("."),
          '/azk/#{manifest.dir}/#{system.name}/node_modules': persistent("./node_modules")
        },
    but this does not make sense.... :P
    @Bartekus what does happens when you try to start?
    Bartek Kus
    @bartekus
    With the setup I posted, one side would not have access to ionic so to me it would indicate lack of access to global npm node_modules
    I honestly would settle for one system if I could have two uri's if that's possible
    Saito
    @saitodisse
    Do you want to share persistents? Try this: '/azk/#{manifest.dir}/node_modules': persistent("PRIIM_NODE_MODULES") on both systems. They may share node_modules, you can see with azk info
    @Bartekus is that an open source? If I can get to code it will be easy to see whats happening.
    Bartek Kus
    @bartekus
    @saitodisse yes I can upload it to github… I just gotta quickly dress and head out to the office since I’m still in bed as I’ve just got up lol
    but once there I’ll upload the build… also like I said, I don’t mind one systems but I’ve been having problems trying to get it working with more than one port accessible, like this:
     ports: {
          // exports global variables
          data: “5000”,
          http: "8100",
        },
        envs: {
          // Make sure that the PORT value is the same as the one
          // in ports/http below, and that it's also the same
          // if you're setting it in a .env file
          PORT: “5000”,
          DEV: "8100",
        }
    Saito
    @saitodisse
    The exported port will be another port. You can fix the port, but it not recommended: http://docs.azk.io/en/reference/azkfilejs/ports.html
    Bartek Kus
    @bartekus
    Yeah that's why I thought having azk bind it to a separate uri would be a better idea
    Saito
    @saitodisse
    yep, but if have more than one port you will have to export the port from the dependent system with export_envs: http://docs.azk.io/en/reference/azkfilejs/export_envs.html
    Bartek Kus
    @bartekus
    Do that to the port that
    Saito
    @saitodisse
    Bartek Kus
    @bartekus
    is used by the system so that would allow the other to be assigned to uri and easily accessible by the user
    Saito
    @saitodisse
    so the priim-client will know server ports
    Bartek Kus
    @bartekus
    Exactly
    CJ Lazell
    @cj
    morning. is it possible to access the live process, so you can access the binding.pry in ruby?
    Bartek Kus
    @bartekus
    you could go into the shell and access it from there, try: azk shell followed by you system name
    CJ Lazell
    @cj
    @Bartekus how would I then access it unless azk loads things in screen or tmux?
    Bartek Kus
    @bartekus
    you could execute it like this: azk start<sys-name>-vv && azk logs —follow
    then go to shell to execute whatever other commands you want: azk shell<sys-name>
    or execute them from the console like this: azk shell<sys-name><command>
    Gullit Miranda
    @gullitmiranda
    @cj unfortunately the azk shell still does not have a way to access a container running.
    you can use adocker exec for now.
    example:
    # start system using azk
    azk start [system_name]
    # get id of running container
    adocker ps | grep [system_name]
    #  connecting in running system
    adocker exec $CONTAINER_ID
    CJ Lazell
    @cj
    @gullitmiranda any way to have azk output the ID?
    Gullit Miranda
    @gullitmiranda
    @cj not. the azk does not show the container ID (yet).
    CJ Lazell
    @cj
    @gullitmiranda how would you compare yourselves to http://www.kontena.io/ ?
    Gullit Miranda
    @gullitmiranda
    @cj azk is a tool to orchestrate development environments
    kontena is a tool to deploy your application using container plataform
    CJ Lazell
    @cj
    thank you for the response. azk only pushes to a single DO instance right now, correct?
    Gullit Miranda
    @gullitmiranda
    nope
    CJ Lazell
    @cj
    really? I don't see any load blancing or anything at http://docs.azk.io/en/deploy/
    Gullit Miranda
    @gullitmiranda
    for the DO, there is an image with scripts that automates the process of creation of machines
    http://images.azk.io/#/deploy-digitalocean?_k=p7paz2
    but it is possible to deploy to any machine (based on ubuntu) with ssh access.
    http://images.azk.io/#/deploy?_k=tfcq41
    the focus of the azk is the development environment, but the Azuki will be able to carry it to any cloud service.
    but while the Azuki is not ready, it is possible to use images (as mentioned above) to deploy to where you want it.
    CJ Lazell
    @cj
    I get you... thank you for all the info
    Gullit Miranda
    @gullitmiranda
    example: azukiapp/azk#637
    you are using the azk with Ruby on Rails?
    CJ Lazell
    @cj
    no rails, too bloated :)
    Gullit Miranda
    @gullitmiranda
    interesting, did not know.
    Gullit Miranda
    @gullitmiranda
    worked well with the azk?
    CJ Lazell
    @cj
    yep :)