These are chat archives for azukiapp/azk

Feb 2016
Bartek Kus
Feb 16 2016 00:04 UTC
No matter what I can’t seem to force azk to drop all the previous builds and start fresh
I can execute the build in osx normaly, but trying to get azk to start the build causes the same errors as before despite the fact that the build has been readjusted… where are the azk files stored since I’d like to manualy erase them to force azk to recreate everything from scratch
Bartek Kus
Feb 16 2016 00:26 UTC
Since it’s not fair for the rest of people in the room I’ve take this issue to github where I made a ticket about it.
Bartek Kus
Feb 16 2016 02:15 UTC

ok, I started from scratch and used different name and the build that I knew was working before and so far, so good… except that it has been like 20 minutes and I’m still looking at this:

TASK [configure : Restart dbus] ************************************************
changed: [default]

TASK [configure : Set iptables to forward traffic to load balancer] ************
changed: [default] => (item=iptables -t nat -A PREROUTING -i eth0 -p tcp -m tcp --dport 80 -j DNAT --to-destination
changed: [default] => (item=iptables-save > /etc/iptables/rules.v4)

TASK [envs : Copy .env to server] **********************************************
changed: [default]

TASK [envs : Adding load $HOME/.env file into .profile] ************************
ok: [default]

TASK [envs : Adding env vars into $HOME/.env] **********************************
ok: [default] => (item={u'key': u'HOST_IP', u'value': u''})
ok: [default] => (item={u'key': u'HOST_DOMAIN', u'value': u';'})
ok: [default] => (item={u'key': u'AZK_AGENT_START_COMMAND', u'value': u'azk agent start'})
ok: [default] => (item={u'key': u'AZK_RESTART_COMMAND', u'value': u'azk restart -R'})
ok: [default] => (item={u'key': u'GIT_REF', u'value': u'master'})

PLAY RECAP *********************************************************************
default                    : ok=14   changed=7    unreachable=0    failed=0

Enter passphrase for key '/root/.ssh/id_rsa':
Counting objects: 2593, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (1005/1005), done.
Writing objects: 100% (2593/2593), 673.88 KiB | 0 bytes/s, done.
Total 2593 (delta 1401), reused 2528 (delta 1374)
remote: $> git --work-tree=/home/git/d09ffff --git-dir=/home/git/d09ffff.git checkout master -f
remote: Already on 'master'
remote: Starting azk. Maybe downloading images be needed. Please be patient.
remote: $> azk restart -R
remote: azk: System `meatier` not running
remote: azk: System `rethinkdb` not running
remote: azk: Skip stoping, system `deploy` does not scale.
remote: azk: ↑ starting `meatier` system, 1 new instances...
remote: azk: ↑ starting `rethinkdb` system, 1 new instances...
remote: azk: ✓ checking `azukiapp/node:latest` image...
remote: azk: ◴ waiting for `rethinkdb` system to start, trying connection to port http/tcp...
remote: azk: ↻ provisioning `meatier` system...

Is it stuck or should I keep on waiting?

this is the Azkfile that I use:
  meatier: {
    docker_extra: {
      User: 'root',
    depends: ["rethinkdb"],
    // More images:
    image: {"docker": "azukiapp/node"},
    // Steps to execute before running instances
    provision: [
      "npm install",
    workdir: "/azk/#{manifest.dir}",
    shell: "/bin/bash",
    command: ["npm", "run", "quickstart"],
    wait: {"retry": 2, "timeout": 20000},
    mounts: {
      '/azk/#{manifest.dir}': sync("."),
      '/azk/#{manifest.dir}/node_modules': persistent("./node_modules"),
    scalable: {"default": 1},
    http: {
      domains: [
    ports: {
      // exports global variables
      http: "3000/tcp",
    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
      NODE_ENV: "development",
      PORT: "3000",
      GRAPHQL_HOST: "#{}.#{azk.default_domain}"

  rethinkdb: {
    image: { docker: "rethinkdb" },
    shell: '/bin/bash',
    scalable: false,
    command: "rethinkdb --bind all --direct-io --cache-size auto --server-name rethinkdb --directory ./rethinkdb --canonical-address",
    wait: {"retry": 2, "timeout": 5000},
    mounts: {
      '/rethinkdb': persistent('rethinkdb-#{manifest.dir}'),
    ports: {
      http: "8080",
      data: "28015",
      cluster: "29015",
    http: {
      domains: [ '#{}.#{azk.default_domain}' ],
    export_envs: {
      "DATABASE_HOST": '#{}',
      "DATABASE_PORT": '#{}',
      "DATABASE_URL": 'rethinkdb://#{}:#{}',

  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:        "",
    scalable: {"default": 0, "limit": 0}

Bartek Kus
Feb 16 2016 02:28 UTC
ok it seems that it’s frozen but it did deploy it, as I can access the build thru the IP, but not the hostname that’s contained in the .env file
excellent, I’ll resolve the other ticket by incrementaly building from this to see where the breaking changes are introduced
Danni Friedland
Feb 16 2016 12:20 UTC
hi guys
i'm trying to run my mocha tests using azk
i've added test package json
that runs
and made npm test the command in azk
but when i do azk start
i get no response :(
Gullit Miranda
Feb 16 2016 16:26 UTC
@Bartekus by what I have perceived, you have had a series of problems with the installation of packages from npm. I recommend you to clear your local persistents and see if they will work.
hi @BlueHotDog the command start is more used for services (that will be accessed). to tests I recommend you use the azk shell:
$ azk shell [system_name]
npm install
npm test # or you test command
Danni Friedland
Feb 16 2016 17:18 UTC
@gullitmiranda but then i cannot run many services tests, and i need to manually enter and run
Gullit Miranda
Feb 16 2016 17:19 UTC
the commands that I sent above is just to manually run
with the azk shell you access an application's context, and from it you can run what you need.
Danni Friedland
Feb 16 2016 17:25 UTC
right, but if i have 10 applications
and want to test them all
Gullit Miranda
Feb 16 2016 17:28 UTC
how would you do it without the azk?
Danni Friedland
Feb 16 2016 17:29 UTC
good question :)
i would write a shell script that will run some commands on some containers
my dream is "gulp test"
to my entire stack
Gullit Miranda
Feb 16 2016 17:30 UTC
what types of projects usually work?
if you create a battery of tests with gulp it is possible to use both with the azk as without. =D
I usually use a Makefile or shell script to automate the build process and test some things
# Makefile
    azk shell app1 -- mix test
    azk shell app1 -- gulp test
    azk shell app1 -- rake test
set -e
azk shell app1 -- mix test
azk shell app1 -- gulp test
azk shell app1 -- rake test
Gullit Miranda
Feb 16 2016 17:38 UTC
I know that is not the ideal way, but it is what it is for now.
we have thought of a scheme of groups for the Azkfile, but we have focused on other priorities at the moment. I wish I could have more "man power" to do everything right
Danni Friedland
Feb 16 2016 19:09 UTC
:) you're doing an amazing job overall :)
no complaints
i wish i had azk exec tests where tests is a command like any other command defined on each system
Gullit Miranda
Feb 16 2016 19:19 UTC
this is another feature: shee azukiapp/azk#568