These are chat archives for azukiapp/azk

7th
Mar 2016
Andreas Schmelas
@m9dfukc
Mar 07 2016 08:58
Hey folks, I'm having issues with the sync() mount option. I'm experiencing slowness with my php application on OsX, so I switched from using the path() to sync() unfortunately it looks like if no files at all are now available to the VM.

I switched from

mounts: { '/azk/#{manifest.dir}/node_modules': persistent('node_modules'), '/azk/#{manifest.dir}/vendor': persistent('vendor'), '/azk/#{manifest.dir}': path('.') }

to

mounts: { '/azk/#{manifest.dir}/node_modules': persistent('node_modules'), '/azk/#{manifest.dir}/vendor': persistent('vendor'), '/azk/#{manifest.dir}': sync('.', {'shell': true}) }

but now it seems that the files won't get synced at all :(

Any help would be much appreciated. Thanks
Andreas Schmelas
@m9dfukc
Mar 07 2016 09:04
By the way, running 'azk 0.17.0' on OsX 10.11
Vytenis
@FDiskas
Mar 07 2016 11:32
$ azk agent start
displays an error
azk: Error: HTTP code is 500 which indicates error: server error - failed to create endpoint dev.azk.io_type.daemon_mid.ce833fc9c9_sys.dns_seq.1_uid.f4f2aae0e4 on network bridge: Bind for 172.17.0.1:53 failed: port is already allocated

azk:     at /usr/lib/azk/node_modules/dockerode/node_modules/docker-modem/lib/modem.js:218:17
azk:     at getCause (/usr/lib/azk/node_modules/dockerode/node_modules/docker-modem/lib/modem.js:246:7)
azk:     at [object Object].Modem.buildPayload (/usr/lib/azk/node_modules/dockerode/node_modules/docker-modem/lib/modem.js:217:5)
azk:     at IncomingMessage.<anonymous> (/usr/lib/azk/node_modules/dockerode/node_modules/docker-modem/lib/modem.js:193:14)
azk:     at IncomingMessage.emit (events.js:117:20)
azk:     at _stream_readable.js:944:16
azk:     at process._tickCallback (node.js:448:13)
Vytenis
@FDiskas
Mar 07 2016 11:47
$ azk agent start --log=debug --no-daemon
Results I will post in next message
Vytenis
@FDiskas
Mar 07 2016 11:58
netstat -tulpn | grep :53
tcp        0      0 192.168.124.1:53        0.0.0.0:*               LISTEN      -                   
udp        0      0 172.17.0.1:53           0.0.0.0:*                           -                   
udp        0      0 192.168.124.1:53        0.0.0.0:*                           -                   
udp6       0      0 :::5353                 :::*                                -
docker ps
CONTAINER ID        IMAGE                COMMAND                  CREATED             STATUS              PORTS                   NAMES
f726b39d94a7        tonistiigi/dnsdock   "/go/bin/dnsdock -nam"   4 days ago          Up 3 days           172.17.0.1:53->53/udp   dnsdock
docker stop f726b39d94a7
And then everything is working now
Sorry for the flood
Vytenis
@FDiskas
Mar 07 2016 12:05
This message was deleted
This message was deleted
Is it posible to change the default development domain from azk.io to something else?
Vytenis
@FDiskas
Mar 07 2016 12:34
All files created in the container are with wrong permissions. In host I cant delete or modify them. My user has a docker group
Vytenis
@FDiskas
Mar 07 2016 14:17
if Try to run
azk restart -R
I hope that it will restart and reprovision. I know that prossion commands is running slow, like npm install and composer install, bu I got very quick response with success.
Julio Makdisse Saito
@saitodisse
Mar 07 2016 15:18
Hi @FDiskas. Try to run azk restart -Rvv to enable a verbose output.
:point_up: March 7, 2016 9:34 AM Yep, Docker always create files with root owner
All files created in the container are with wrong permissions. In host I cant delete or modify them. My user has a docker group
you can run this to get your files back: sudo chown -Rid -un:id -gn./PROJECT_FOLDER/
Julio Makdisse Saito
@saitodisse
Mar 07 2016 15:27

@m9dfukc

mounts: {
 '/azk/#{manifest.dir}/node_modules': persistent('node_modules'),
 '/azk/#{manifest.dir}/vendor': persistent('vendor'),
 '/azk/#{manifest.dir}': sync('.', {'shell': true}) 
}

sync Note it's a one-way sync, so you still have to add entries in mounts indicating which folders need to use the share option (using path or persistent).

Vytenis
@FDiskas
Mar 07 2016 15:30
sudo chown -R $USER:$USER .
this hellped to get access to the files
Julio Makdisse Saito
@saitodisse
Mar 07 2016 15:32
Thats right. You can create a shell script to do that all time you need. Maybe soon Docker will fix this.
Vytenis
@FDiskas
Mar 07 2016 15:33
I got working this. In docker-compose I have no problems with permmissions
Julio Makdisse Saito
@saitodisse
Mar 07 2016 15:33
@FDiskas even when you get files outside the container?
Vytenis
@FDiskas
Mar 07 2016 15:34

I'm accessing the shell

docker exec -u 1000 -it $CONTAINER bash

in Docker file

RUN usermod -u 1000 www-data
RUN chown 1000:1000 /var/www
Julio Makdisse Saito
@saitodisse
Mar 07 2016 15:35
Interesting. Thanks for the adivice
Julio Makdisse Saito
@saitodisse
Mar 07 2016 15:45
@m9dfukc, maybe your problem on sync is related to .gitignore - you may check this: http://docs.azk.io/en/reference/azkfilejs/mounts.html#excluded-folders
Andreas Schmelas
@m9dfukc
Mar 07 2016 16:00
@saitodisse ... thanks, just checked that – still doesn't work :(
I fear I'm missing something essential here?! "One-way sync" means it's syncing my local files into the VM - right?!
The thing is, if I shell into my VM ... I don't see any files/folders at all. I just see the folders I declared as 'persistent' but they are also empty.
Vytenis
@FDiskas
Mar 07 2016 16:18
I'm trying to run symfony, but looks like file sync is very slow.
https://github.com/nfq-eta/symfony-3-elixir-azk-gulp
what I did wrong?

If I try to run

azk restart -Rvv

I got

azk: ↑ starting `gulp` system, 1 new instances...
azk: ↑ starting `mysql` system, 1 new instances...
azk: ✓ checking `azkbuild/2dd8e60d8e-gulp:f45503eb6a58d6a416a470528cddf0863cd90367` image...
azk: ◴ waiting for `mysql` system to start, trying connection to port data/tcp...
azk: ↻ provisioning `gulp` system...
azk: ⎘ syncing files for `gulp` system...
stdin: is not a tty

And it hangs. No othe messages are displayed. In seperate console window azk status returns that container not running

Vytenis
@FDiskas
Mar 07 2016 16:46
Looks like it not works only on -R command
$ azk start
azk: ↑ starting `mysql` system, 1 new instances...
azk: ✓ checking `azukiapp/mysql:5.7` image...
azk: ◴ waiting for `mysql` system to start, trying connection to port data/tcp...
azk: ↑ starting `gulp` system, 1 new instances...
azk: ✓ checking `azkbuild/2dd8e60d8e-gulp:f45503eb6a58d6a416a470528cddf0863cd90367` image...
azk: ⎘ syncing files for `gulp` system...
azk: ◴ waiting for `gulp` system to start, trying connection to port http/tcp...

┌───┬────────┬───────────┬─────────────────────────────────────────────┬─────────────────┬──────────────┐
│   │ System │ Instances │ Hostname/url                                │ Instances-Ports │ Provisioned  │
├───┼────────┼───────────┼─────────────────────────────────────────────┼─────────────────┼──────────────┤
│ ↑ │ mysql  │ 1         │ dev.azk.io                                  │ 1-data:32779    │ -            │
├───┼────────┼───────────┼─────────────────────────────────────────────┼─────────────────┼──────────────┤
│ ↑ │ gulp   │ 1         │ http://symfony-3-elixir-azk-gulp.dev.azk.io │ 1-http:32780    │ a minute ago │
└───┴────────┴───────────┴─────────────────────────────────────────────┴─────────────────┴──────────────┘
[vytenis@vytenis symfony-3-elixir-azk-gulp] $ azk restart -Rvv
azk: ↓ stopping `gulp` system, 1 instances...
azk: ↓ stopping `mysql` system, 1 instances...
azk: ↑ starting `gulp` system, 1 new instances...
azk: ↑ starting `mysql` system, 1 new instances...
azk: ✓ checking `azkbuild/2dd8e60d8e-gulp:f45503eb6a58d6a416a470528cddf0863cd90367` image...
azk: ◴ waiting for `mysql` system to start, trying connection to port data/tcp...
azk: ↻ provisioning `gulp` system...
azk: ⎘ syncing files for `gulp` system...
stdin: is not a tty
composer is running slow, and azk does not tranfer messages
Felipe Arenales Santos
@fearenales
Mar 07 2016 17:43
@FDiskas: can you try to change the first mount on your Azkfile to '/var/www/html': sync(".", {shell: true}),, then run azk shell and try to run your provisioning steps, please?
@FDiskas: you can change the azk domain from dev.azk.io, but it's highly discouraged. Any special reason for doing this?
@m9dfukc : hi! would you mind to share your Azkfile, so that we can analyze it? :) Feel free to protect any sensitive data it may contain!
Julio Makdisse Saito
@saitodisse
Mar 07 2016 17:52
@m9dfukc: Yes, sync is from VM to Container only
Vytenis
@FDiskas
Mar 07 2016 18:56
@fearenales abaut changing the domain. This is needed for branding and that I could remember more easy :)
Felipe Arenales Santos
@fearenales
Mar 07 2016 19:58
@FDiskas ok, got it. :) but that's ok for you to keep using azk's one for now?
Slobodan Mišković
@slobo
Mar 07 2016 23:12
@FDiskas, we use env var AZK_BALANCER_HOST=staging.ourdomain.com to change the default domain on our staging server. You may need to remove /etc/resolver/* before starting the agent for the first time, but other than that I think it's been smooth sailing for us with custom domain. Nice thing is that you can keep "#{system.name}.#{azk.default_domain}" in Azkfile, and still have .dev.azk.io on developer machines, so every dev doesn't need to play with exporting variables before messing with azk.