Skip to content
This repository has been archived by the owner on Apr 9, 2020. It is now read-only.

azk logs -f not following logs #685

Open
rictorres opened this issue Jul 8, 2016 · 1 comment
Open

azk logs -f not following logs #685

rictorres opened this issue Jul 8, 2016 · 1 comment

Comments

@rictorres
Copy link

rictorres commented Jul 8, 2016

1. What are you trying do accomplish?

I'm trying to follow logs from all apps and/or a single app.

2. Steps to reproduce the described behavior

azk logs -f or azk logs SYSTEM_NAME -f

3. Output

No message, also no logs :) It was working maybe 30min ago, I've restarted the agent but still got the same behavior.

Please see this short screencast for more info: http://d.pr/v/1c5dz

4. Further info

a. Which OS / distro? 10.11
b. Which VirtualBox version? (If running Mac OS X) 5.0.16 r105871
c. Can you provide us your Azkfile.js?

/**
 * Documentation: http://docs.azk.io/Azkfile.js
 */
// Adds the systems that shape your system
systems({
    legacy: {
        // Dependent systems
        depends: ['next', 'mysql', 'redis'],
        // More images:  http://images.azk.io
        image: {'docker': 'azukiapp/php-fpm:5.6'},
        workdir: '/azk/#{manifest.dir}/legacy',
        shell: '/bin/bash',
        wait: 200,
        mounts: {
            '/azk/#{manifest.dir}/legacy': sync('./legacy', { except: './legacy/next' })
        },
        scalable: {'default': 1},
        http: {
            domains: [ '#{system.name}.#{azk.default_domain}' ]
        },
        ports: {
            // exports global variables
            http: '80/tcp'
        },
        envs: {

        },
        export_envs: {

        }
    },

    'legacy-frontend': {
        // Dependent systems
        depends: ['legacy'],
        image: {'docker': 'node:4'},
        // Steps to execute before running instances
        provision: [
            'npm install'
        ],
        workdir: '/azk/#{manifest.dir}/legacy/next',
        shell: '/bin/bash',
        command: ['npm', 'start'],
        wait: 200,
        mounts: {
            '/azk/#{manifest.dir}/legacy/next': sync('./legacy/next'),
            '/azk/#{manifest.dir}/legacy/next/node_modules': persistent('./legacy/next/node_modules')
        },
        scalable: {'default': 1},
        http: {
            domains: [ '#{system.name}.#{azk.default_domain}' ]
        },
        ports: {
            // exports global variables
            http: '4400/tcp'
        },
        envs: {
            // Make sure that the PORT value is the same as the one
            // in ports/http above, and that it's also the same
            // if you're setting it in a .env file
            NODE_ENV: 'development',
            PORT: '4400',

        }
    },

    next: {
        depends: ['mysql', 'redis'],
        image: {'docker': 'node:4'},
        // Steps to execute before running instances
        provision: [
            'npm install'
        ],
        workdir: '/azk/#{manifest.dir}/next',
        shell: '/bin/bash',
        command: ['npm', 'run', 'dev'],
        wait: 200,
        mounts: {
            '/azk/#{manifest.dir}/next': sync('./next'),
            '/azk/#{manifest.dir}/next/node_modules': persistent('./next/node_modules')
        },
        scalable: {'default': 1},
        http: {
            domains: [ '#{system.name}.#{azk.default_domain}' ]
        },
        ports: {
            // exports global variables
            http: '3000/tcp'
        },
        envs: {
            // Make sure that the PORT value is the same as the one
            // in ports/http above, and that it's also the same
            // if you're setting it in a .env file
            NODE_ENV: 'development',
            PORT: '3000',
            NEW_RELIC_DISABLED: true,

        }
    },

    mysql: {
        image: {'docker': 'mysql:5.6'},
        shell: '/bin/bash',
        wait: 100,
        mounts: {
            '/var/lib/mysql': persistent('#{manifest.dir}/#{system.name}_data'),
            // mysql dump file should go in the following folder
            '/docker-entrypoint-initdb.d': sync('./docker-entrypoint-initdb.d')
            // to clean mysql data, run:
            // $ azk shell mysql -c 'rm -rf /var/lib/mysql/*'
        },
        ports: {
            // exports global variables: '#{net.port.data}'
            data: '43306:3306/tcp'
        },
        envs: {
            // set instances variables
            MYSQL_USER              : 'mycujoo',
            MYSQL_PASSWORD          : 'mycujoo',
            MYSQL_ROOT_PASSWORD     : 'root',
            MYSQL_DATABASE          : 'mycujoo'
        },
        export_envs: {

        }
    },

    redis: {
        image: {'docker': 'redis'},
        // uncomment lines below if you want
        // redis to persist data to disk
        // command: ["redis-server", "--appendonly", "yes"],
        // mounts: {
        //   "/data": persistent("data"),
        // },
        ports: {
            data: '6379/tcp'
        },
        export_envs: {
            REDIS_HOST: 'redis://#{net.host}:#{net.port.data}', // legacy uses this var :(
            REDIS_URL: 'redis://#{net.host}:#{net.port.data}' // next uses this var :'(
        }
    }
})

setDefault('legacy')
@rictorres
Copy link
Author

rictorres commented Jul 11, 2016

I forgot to mention that I'm running azk 0.17.0 but my colleagues are on azk 0.18.0 and sometimes they experience the exact same problem.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant