These are chat archives for azukiapp/azk

29th
Mar 2016
Dr Kim Foale
@kimadactyl
Mar 29 2016 10:55
@gullitmiranda the weird thing is it works within the azk shell
the only thing i can think of, i did a git merge that went a bit weird, i cant for the life of me work out what it might have changed but yeah
Dr Kim Foale
@kimadactyl
Mar 29 2016 11:05
atm im getting this when i load from a cold boot :(
im@chips:~/git/taichi/taichi_rails$ azk start
? The agent is not running, would you like to start it? Yes
azk: Please wait, this process may take several minutes
azk: Loading settings and checking dependencies.
azk: Checking version...
azk: azk 0.17.0 detected
azk: Cleaning 0 lost containers
azk: Settings loaded successfully.
azk: Agent is being started...
azk: Trying to connect to docker (unix:///var/run/docker.sock) (timeout: 20s)...
azk: Starting azk dns service...
azk: Dns service started.
azk: Trying to connect to docker (unix:///var/run/docker.sock) (timeout: 20s)...
azk: Starting azk balancer redirect service...
azk: Check if balancer redirect service is up (tcp://172.17.0.1:80) (timeout: 10000s)...
azk: Balancer redirect started.
azk: Starting memcached service...
azk: Memcached service started.
azk: Starting http balancer service...
azk: Http balancer service started.
azk: Agent has been successfully started.
azk: Skip starting, system `deploy` does not scale.
azk: ↑ starting `postgres` system, 1 new instances...
azk: ✓ checking `azukiapp/postgres:9.4` image...
azk: ◴ waiting for `postgres` system to start, trying connection to port data/tcp...
azk: An error occurred. It will stop all instances already running. See details below.

azk: System `taichi-school` not running
azk: ↓ stopping `postgres` system, 1 instances...
azk: Skip stoping, system `deploy` does not scale.
azk: Run system `postgres` return: (0), for command: ["/azk-entrypoint.sh","postgres"]:
azk: [timeout] `azk` has timed out on `postgres` system.
azk: [timeout] Failure to reach port `32768` from `http://dev.azk.io` after 20000 milliseconds.
azk: [timeout] Make sure the start command binds `port` to the `0.0.0.0` interface, not only to the `localhost` interface.
azk: [timeout] You might want to edit your `Azkfile.js` in order to increase the maximum timeout.

azk: Look for azk start troubleshooting documentation for more info at: http://bit.ly/azk_start_troubleshooting

azk: Sorry, an error has occurred.
azk: A crash report about this error will be sent to azk team in order to make azk better.
azk: Sending bug report to Azuki...
azk: Bug report was sent. Thanks.
Dr Kim Foale
@kimadactyl
Mar 29 2016 12:13
seems to be the dns problem rearing its head but all looks fine to me
wait what?!
kim@chips:~/git/taichi/taichi_rails$ getent hosts dev.azk.io
172.17.0.1      dev.azk.io
kim@chips:~/git/taichi/taichi_rails$ dig  dev.azk.io

; <<>> DiG 9.9.5-11ubuntu1.3-Ubuntu <<>> dev.azk.io
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 39839
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;dev.azk.io.            IN    A

;; AUTHORITY SECTION:
azk.io.            899    IN    SOA    ns-584.awsdns-09.net. awsdns-hostmaster.amazon.com. 1 7200 900 1209600 86400

;; Query time: 81 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Tue Mar 29 13:13:28 BST 2016
;; MSG SIZE  rcvd: 123

kim@chips:~/git/taichi/taichi_rails$
Dr Kim Foale
@kimadactyl
Mar 29 2016 12:27
ok will try and pay more attention today sorrry for vanishing :)
Gullit Miranda
@gullitmiranda
Mar 29 2016 15:30
@kimadactyl
ping -c 4 dev.azk.io
on the shell, if the option to shell: true does not have active in sync, the azk shell will use path
http://docs.azk.io/en/reference/azkfilejs/mounts.html#opts-optional
Dr Kim Foale
@kimadactyl
Mar 29 2016 15:34
kim@chips:~/git/taichi/taichi_rails$ ping -c 4 dev.azk.io
PING dev.azk.io (172.17.0.1) 56(84) bytes of data.
64 bytes from 172.17.0.1: icmp_seq=1 ttl=64 time=0.028 ms
64 bytes from 172.17.0.1: icmp_seq=2 ttl=64 time=0.053 ms
64 bytes from 172.17.0.1: icmp_seq=3 ttl=64 time=0.058 ms
64 bytes from 172.17.0.1: icmp_seq=4 ttl=64 time=0.055 ms

--- dev.azk.io ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3001ms
rtt min/avg/max/mdev = 0.028/0.048/0.058/0.013 ms
erm
sorry im lost :)
Gullit Miranda
@gullitmiranda
Mar 29 2016 15:43
its ok
the problem isn't dns-resolver
Dr Kim Foale
@kimadactyl
Mar 29 2016 15:43
oh right ok
yeah i did a total reset to try and clear out that problem deleting all thef iles specified and its not happy at all now
not sure what i did heh
Gullit Miranda
@gullitmiranda
Mar 29 2016 15:44
postgres can be taking to start or be a problem
try this:
$ azk shell postgres
/azk-entrypoint.sh postgres
Dr Kim Foale
@kimadactyl
Mar 29 2016 15:45
kim@chips:~/git/taichi/taichi_rails$ azk shell postgres
root@6ecc7866e490:/# /azk-entrypoint.sh postgres
LOG:  database system was interrupted; last known up at 2016-03-29 15:33:47 UTC
LOG:  database system was not properly shut down; automatic recovery in progress
LOG:  record with zero length at 0/1908EC8
LOG:  redo is not required
LOG:  MultiXact member wraparound protections are now enabled
LOG:  database system is ready to accept connections
LOG:  autovacuum launcher started
brb
Gullit Miranda
@gullitmiranda
Mar 29 2016 15:57
this is the whole log? seems to be ok
kill this process (ctrl+c)
Gullit Miranda
@gullitmiranda
Mar 29 2016 16:07
and run:
$ /azk-entrypoint.sh postgres &
$ psql --username ${POSTGRES_USER} --password=${POSTGRES_PASS}
# enter password
# run `\l`
=# \l
Dr Kim Foale
@kimadactyl
Mar 29 2016 16:08
from inside the shell or no/
root@25b25b8af64f:/# psql --username ${POSTGRES_USER} --password=${POSTGRES_PASS}
psql: option '--password' doesn't allow an argument
Try "psql --help" for more information.
root@25b25b8af64f:/# psql --username ${POSTGRES_USER}
FATAL:  database "azk" does not exist
psql: FATAL:  database "azk" does not exist
root@25b25b8af64f:/#
ahha
Gullit Miranda
@gullitmiranda
Mar 29 2016 16:29
sorry, wrong command
psql --username ${POSTGRES_USER} --password ${POSTGRES_DB}
Dr Kim Foale
@kimadactyl
Mar 29 2016 16:30
taichi_live=# taichi_live=# \l
                                  List of databases
    Name     |  Owner   | Encoding |  Collate   |   Ctype    |   Access privileges   
-------------+----------+----------+------------+------------+-----------------------
 postgres    | postgres | UTF8     | en_US.utf8 | en_US.utf8 | 
 taichi_live | postgres | UTF8     | en_US.utf8 | en_US.utf8 | 
 template0   | postgres | UTF8     | en_US.utf8 | en_US.utf8 | =c/postgres          +
             |          |          |            |            | postgres=CTc/postgres
 template1   | postgres | UTF8     | en_US.utf8 | en_US.utf8 | =c/postgres          +
             |          |          |            |            | postgres=CTc/postgres
(4 rows)
ahha ok need to rename the db?
oh no thats right
Gullit Miranda
@gullitmiranda
Mar 29 2016 16:34
your database name is taichi_live, right?
Dr Kim Foale
@kimadactyl
Mar 29 2016 16:34
yes
Gullit Miranda
@gullitmiranda
Mar 29 2016 16:35
so there is no need
Dr Kim Foale
@kimadactyl
Mar 29 2016 16:35
yeah was just overthinking it :)
Gullit Miranda
@gullitmiranda
Mar 29 2016 16:35
it seems the everything is ok with postgres
Dr Kim Foale
@kimadactyl
Mar 29 2016 16:36
yeah weird.
Gullit Miranda
@gullitmiranda
Mar 29 2016 16:36
so in your Azkfile try to increase the wait of postgre
Dr Kim Foale
@kimadactyl
Mar 29 2016 16:36
just fyi
ok
azk: [timeout] Failure to reach port `32769` from `http://dev.azk.io` after 50000 milliseconds.
:(
Dr Kim Foale
@kimadactyl
Mar 29 2016 16:41
azk: [timeout] Failure to reach port `32770` from `http://dev.azk.io` after 120000 milliseconds.
Gullit Miranda
@gullitmiranda
Mar 29 2016 16:42
try clean database:
azk shell postgres -- rm -rf \$PG_DATA/*
azk start postgres
Dr Kim Foale
@kimadactyl
Mar 29 2016 16:44
oh woo that worked :D
hmm thats strange im getting
Migrations are pending. To resolve this issue, run: bin/rake db:migrate RAILS_ENV=development
but it should be in production mode
Dr Kim Foale
@kimadactyl
Mar 29 2016 16:57
nm needed to re-add puma
Gullit Miranda
@gullitmiranda
Mar 29 2016 17:01
you need run --reprovision in start of your application
azk start -Rvvv
Dr Kim Foale
@kimadactyl
Mar 29 2016 17:01
yepyep did tha tworking now :D
and the deploy seems to be working fine too now
well still rolling this is exciting :)
Gullit Miranda
@gullitmiranda
Mar 29 2016 17:04
rsrs =D
Dr Kim Foale
@kimadactyl
Mar 29 2016 17:06
hah damn
"no appliation configured"
btw what does the little "worker" block do in here? do i need it? https://github.com/run-project/stringer/blob/master/Azkfile.js
oh wait
remote: azk: ◴ waiting for `postgres` system to start, trying connection to port data/tcp...
remote: azk: An error occurred. It will stop all instances already running. See details below.
remote: 
remote: azk: System `postgres` not running
remote: azk: System `taichi-school` not running
remote: azk: Error: HTTP code is 404 which indicates error: no such container - No such container: f0ac55ac3e8b9173bad32dfe3adc5075984b213cc8e10c40f39b6ebcf5cd5772
remote: 
remote: azk:     at /usr/lib/azk/node_modules/dockerode/node_modules/docker-modem/lib/modem.js:218:17
remote: azk:     at getCause (/usr/lib/azk/node_modules/dockerode/node_modules/docker-modem/lib/modem.js:246:7)
remote: azk:     at [object Object].Modem.buildPayload (/usr/lib/azk/node_modules/dockerode/node_modules/docker-modem/lib/modem.js:217:5)
remote: azk:     at IncomingMessage.<anonymous> (/usr/lib/azk/node_modules/dockerode/node_modules/docker-modem/lib/modem.js:193:14)
remote: azk:     at IncomingMessage.emit (events.js:117:20)
remote: azk:     at _stream_readable.js:944:16
remote: azk:     at process._tickCallback (node.js:448:13)
remote: azk: Sorry, an error has occurred.
remote: azk: A crash report about this error will be sent to azk team in order to make azk better.
remote: azk: Sending bug report to Azuki...
remote: azk: Bug report was sent. Thanks.
To ssh://git@188.166.147.183:22/home/git/2838c6f.git
 * [new branch]      add-azk -> add-azk

App successfully deployed at http://188.166.147.183
Gullit Miranda
@gullitmiranda
Mar 29 2016 17:19
very strange
it is a new droplet?
Dr Kim Foale
@kimadactyl
Mar 29 2016 17:19
yes
Gullit Miranda
@gullitmiranda
Mar 29 2016 17:21
which the log previous to the one you sent me?
Dr Kim Foale
@kimadactyl
Mar 29 2016 17:21
that's the one when i do azk deploy
Gullit Miranda
@gullitmiranda
Mar 29 2016 17:21
yes. but it has more log before this, right?
Dr Kim Foale
@kimadactyl
Mar 29 2016 17:22
want all of it? its really long :)
Gullit Miranda
@gullitmiranda
Mar 29 2016 17:22
I would like to see at least the beginning of the start of the applications.
Dr Kim Foale
@kimadactyl
Mar 29 2016 17:23
try that log or do you mean the log from when i do reprovision?
Gullit Miranda
@gullitmiranda
Mar 29 2016 17:24
log of deploy, that you have already sent
it seems that the system of postgres did not rise properly.
Dr Kim Foale
@kimadactyl
Mar 29 2016 17:25
i swear postgres is just mysql with more drama :)
Gullit Miranda
@gullitmiranda
Mar 29 2016 17:25
try:
azk deploy ssh
Dr Kim Foale
@kimadactyl
Mar 29 2016 17:26
im in, can see the droplet there too
Gullit Miranda
@gullitmiranda
Mar 29 2016 17:26
I disagree, but that's not the case =D
ok
after ssh, run:
ls -alh
Dr Kim Foale
@kimadactyl
Mar 29 2016 17:26
oh really? maybe i should do an online course or something i always seem to just fight it
git@taichi-school-azk:~$ ls -lah
total 48K
drwxr-xr-x  8 git  git  4.0K Mar 29 13:00 .
drwxr-xr-x  3 root root 4.0K Mar 29 13:00 ..
drwxrwxr-x 16 git  git  4.0K Mar 29 13:04 2838c6f
drwxrwxr-x  8 git  git  4.0K Mar 29 13:03 2838c6f.git
drwxr-xr-x  3 git  git  4.0K Mar 29 13:00 .azk
-rw-r--r--  1 git  git   220 Apr  8  2014 .bash_logout
-rw-r--r--  1 git  git  3.6K Apr  8  2014 .bashrc
drwxrwxr-x  2 git  git  4.0K Mar 29 13:00 bin
drwx------  2 git  git  4.0K Mar 29 13:00 .cache
-rw-r--r--  1 git  root  175 Mar 29 13:00 .env
-rw-r--r--  1 git  git   688 Mar 29 13:00 .profile
drwxrwxr-x  2 git  git  4.0K Mar 29 13:00 .ssh
Gullit Miranda
@gullitmiranda
Mar 29 2016 17:28
$ cd 2838c6f
$ azk start -vvvv postgres && azk logs -f postgres
Dr Kim Foale
@kimadactyl
Mar 29 2016 17:29
it@taichi-school-azk:~/2838c6f$ azk start -vvvv postgres && azk logs -f postgres
azk: ↑ starting `postgres` system, 1 new instances...
azk: ✓ checking `azukiapp/postgres:9.4` image...
azk: ◴ waiting for `postgres` system to start, trying connection to port data/tcp...
postgres: could not find the database system
Expected to find it in the directory "/var/lib/postgresql/data",
but could not open file "/var/lib/postgresql/data/global/pg_control": No such file or directory
azk: An error occurred. It will stop all instances already running. See details below.

azk: System `postgres` not running
azk: Run system `postgres` return: (2), for command: ["/azk-entrypoint.sh","postgres"]:
azk:  .postgres [log] >  postgres: could not find the database system
azk:  .postgres [log] >  Expected to find it in the directory "/var/lib/postgresql/data",
azk:  .postgres [log] >  but could not open file "/var/lib/postgresql/data/global/pg_control": No such file or directory
azk:  .postgres [log] >  

azk: Look for azk start troubleshooting documentation for more info at: http://bit.ly/azk_start_troubleshooting

azk: Sorry, an error has occurred.
azk: A crash report about this error will be sent to azk team in order to make azk better.
? Bonus: if you're ok with telling us your email address, we'll be able to reply you with a solution for this issue.
Important: Your email will be saved for future crash reports (we'll never share your email).
You can always delete/update your email at any time. See http://docs.azk.io/en/reference/cli/config.html#azk-config
Enter your email [optional]: kim@alliscalm.net
azk: Current email: kim@alliscalm.net
azk: Sending bug report to Azuki...
azk: Bug report was sent. Thanks.
git@taichi-school-azk:~/2838c6f$
Gullit Miranda
@gullitmiranda
Mar 29 2016 17:30
you see this: .postgres [log] > postgres: could not find the database system
it seems that postgres does not create the database
try:
azk shell postgres -- rm -rf \$PG_DATA/*
azk start postgres
Dr Kim Foale
@kimadactyl
Mar 29 2016 17:32
from locally or on the remote?
Gullit Miranda
@gullitmiranda
Mar 29 2016 17:32
about postgres, see https://speakerdeck.com/fnando/porque-usar-postgresql-se-voce-ainda-nao-o-faz (is in pt-br but I think that the to get a sense of the differences)
run command in remote
Dr Kim Foale
@kimadactyl
Mar 29 2016 17:37
cool :)
its doing stuff......
Dr Kim Foale
@kimadactyl
Mar 29 2016 17:43
yessss :D its working!!!!!
i have to run to a musical now thanks so much. will be back with more questions later ;) might add to your docs a little if thats cool!
wooooooooooooo!
Gullit Miranda
@gullitmiranda
Mar 29 2016 17:53
nice. good musical =D
Dr Kim Foale
@kimadactyl
Mar 29 2016 21:44
yeah it was chicago actually really good :D
was sooooo high up tho seriously
next weirdproblem tho ;) http://188.166.147.183/ works fine, https://beta.taichi.school/ does not, something i need to do better with the dns? hmmmm
Dr Kim Foale
@kimadactyl
Mar 29 2016 21:50
ohhh and the database isnt working again :(
Gullit Miranda
@gullitmiranda
Mar 29 2016 21:51
@kimadactyl you not setted env HOST_DOMAIN: http://beta.taichi.scholl
Dr Kim Foale
@kimadactyl
Mar 29 2016 21:51
think i have?
or does it need to be in the deploy block?https://gist.github.com/kimadactyl/098d87c0a8abedf1bfa1
Gullit Miranda
@gullitmiranda
Mar 29 2016 21:53
yes. you need set the env HOST_DOMAIN (to add in loadbalancer) and configure CNAME in your domain
Dr Kim Foale
@kimadactyl
Mar 29 2016 21:53
was thinking about the postgres thing too. wondering if the table needs to exist before it can provision it and its doing it back to front hmm
erm
Gullit Miranda
@gullitmiranda
Mar 29 2016 21:55
hum, I thinking about postgres
Dr Kim Foale
@kimadactyl
Mar 29 2016 21:55
ok cool. whats the best update deploy commmand to use?
Gullit Miranda
@gullitmiranda
Mar 29 2016 21:55
I'm not understand why your DB is only working on the first run.
git commit ...
azk deploy
only this =D
Dr Kim Foale
@kimadactyl
Mar 29 2016 21:56
awesome
CNAME and not A?
Gullit Miranda
@gullitmiranda
Mar 29 2016 22:03
wait, I'll check
yes, is A
Dr Kim Foale
@kimadactyl
Mar 29 2016 22:05
great thanks
oh man i have some branch issues ugh :D
Gullit Miranda
@gullitmiranda
Mar 29 2016 22:05
wlc
what are they?
Dr Kim Foale
@kimadactyl
Mar 29 2016 22:06
ufffff. i think i might have been working on the wrong branch :/ surely not tho. something weird is going on
ok no its fine it got switched to master somehow how strange
hmm ok dns is pointing to the right place, and i've updated deploy envs with HOST_DOMAIN: 'beta.taichi.school', still no luck hmm
Gullit Miranda
@gullitmiranda
Mar 29 2016 22:09
$ dig beta.taichi.a escola

; <<>> DiG 9.8.3-P1 <<>> beta.taichi.a escola
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 5229
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;beta.taichi.a.            IN    A

;; AUTHORITY SECTION:
.            1799    IN    SOA    a.root-servers.net. nstld.verisign-grs.com. 2016032901 1800 900 604800 86400

;; Query time: 581 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Tue Mar 29 19:08:42 2016
;; MSG SIZE  rcvd: 106
# ....
Dr Kim Foale
@kimadactyl
Mar 29 2016 22:10
.a?
Gullit Miranda
@gullitmiranda
Mar 29 2016 22:10
I believe that you will need to expect to happen to the dns propagation
sorry, wrong address :(
its works for me
Dr Kim Foale
@kimadactyl
Mar 29 2016 22:11
haha np :D yes it did work, it was giving me "application not configured"
really its wokring?
Gullit Miranda
@gullitmiranda
Mar 29 2016 22:12
This message was deleted
Dr Kim Foale
@kimadactyl
Mar 29 2016 22:12
im just getting "No Application Configured" sorry
Gullit Miranda
@gullitmiranda
Mar 29 2016 22:12
work with IP :( my bad
Dr Kim Foale
@kimadactyl
Mar 29 2016 22:12
npnp :)
Gullit Miranda
@gullitmiranda
Mar 29 2016 22:13
right, you pushed HOST_DOMAIN change in your Azkfile?
this happened but it seems happy now
kim@chips:~/git/taichi/taichi_rails$ azk deploy
Counting objects: 3, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 713 bytes | 0 bytes/s, done.
Total 3 (delta 2), reused 0 (delta 0)
remote: $> git --work-tree=/home/git/2838c6f --git-dir=/home/git/2838c6f.git checkout add-azk -f
remote: Already on 'add-azk'
remote: Starting azk. Maybe downloading images be needed. Please be patient.
remote: $> azk restart -Rvv
remote: FATAL ERROR: Evacuation Allocation failed - process out of memory
remote: Aborted (core dumped)
To ssh://git@188.166.147.183:22/home/git/2838c6f.git
   077730b..838b904  add-azk -> add-azk

App successfully deployed at http://beta.taichi.school (188.166.147.183)

kim@chips:~/git/taichi/taichi_rails$ azk deploy
Everything up-to-date

App successfully deployed at http://beta.taichi.school (188.166.147.183)
Gullit Miranda
@gullitmiranda
Mar 29 2016 22:14
$ azk deploy ssh
$ cd 2838c6f
$ cat Azkfile | grep HOST_DOMAIN
you changed git branch, right?
Dr Kim Foale
@kimadactyl
Mar 29 2016 22:15
erm first command returns me to local shell?
yes
Gullit Miranda
@gullitmiranda
Mar 29 2016 22:16
sorry, i fix edited first command
I think that the problem may be the change of branch.
Dr Kim Foale
@kimadactyl
Mar 29 2016 22:16
git@taichi-school-azk:~/2838c6f$ cat Azkfile.js | grep HOST_DOMAIN
        '#{env.HOST_DOMAIN}',                   // used if deployed
     HOST_DOMAIN: 'beta.taichi.school',
Gullit Miranda
@gullitmiranda
Mar 29 2016 22:17
Azkfile it's ok
but I'm not sure if the application was restarted after the change
Dr Kim Foale
@kimadactyl
Mar 29 2016 22:17
azk restarT?
Gullit Miranda
@gullitmiranda
Mar 29 2016 22:18
and another thing, I'm not sure about the change of branch. Who can report this with more details is @fearenales.
Dr Kim Foale
@kimadactyl
Mar 29 2016 22:18
hmm. ive been on this branch most of the time i have no idea how it got swapped to master
would youprefer me to merge?
Gullit Miranda
@gullitmiranda
Mar 29 2016 22:18
try:
azk deploy restart
Dr Kim Foale
@kimadactyl
Mar 29 2016 22:19
kim@chips:~/git/taichi/taichi_rails$ azk deploy restart
Starting azk. Maybe downloading images be needed. Please be patient.
$> azk restart -Rvv
FATAL ERROR: Evacuation Allocation failed - process out of memory
Aborted (core dumped)
Gullit Miranda
@gullitmiranda
Mar 29 2016 22:20
let me see if @fearenales is online now. If you have it can you explain this better, it was he who created the images of the deploy.
Dr Kim Foale
@kimadactyl
Mar 29 2016 22:20
sure :)
Gullit Miranda
@gullitmiranda
Mar 29 2016 22:24
ok, @fearenales answer
the deploy use the GIT_REF
Dr Kim Foale
@kimadactyl
Mar 29 2016 22:25
yeah i have that, im using that branch locally
trying to do this dev thing like an adult lol
Gullit Miranda
@gullitmiranda
Mar 29 2016 22:25
ok
Dr Kim Foale
@kimadactyl
Mar 29 2016 22:25
that all seems to be working fine
back in a short while
SO CLOSE ahhh
Gullit Miranda
@gullitmiranda
Mar 29 2016 22:26
hehehe
worked with domain http://beta.taichi.school ?
Dr Kim Foale
@kimadactyl
Mar 29 2016 22:31
its not working with the domain no :(
Gullit Miranda
@gullitmiranda
Mar 29 2016 22:31
:(
Dr Kim Foale
@kimadactyl
Mar 29 2016 22:31
and the db isnt connecting either
weird
Gullit Miranda
@gullitmiranda
Mar 29 2016 22:31
try this then
$ azk deploy ssh
$ cd 2838c6f
$ azk stop
$ azk start -vvvvv
Dr Kim Foale
@kimadactyl
Mar 29 2016 22:33
hmm
git@taichi-school-azk:~/2838c6f$ azk stop
FATAL ERROR: Evacuation Allocation failed - process out of memory

Aborted (core dumped)
git@taichi-school-azk:~/2838c6f$ azk start -vvvvv
FATAL ERROR: Evacuation Allocation failed - process out of memory
Gullit Miranda
@gullitmiranda
Mar 29 2016 22:34
:scream:
Dr Kim Foale
@kimadactyl
Mar 29 2016 22:34
:D
Gullit Miranda
@gullitmiranda
Mar 29 2016 22:35
run then:
$ azk deploy ssh
$ free -h
Dr Kim Foale
@kimadactyl
Mar 29 2016 22:35
git@taichi-school-azk:~/2838c6f$ free -h
             total       used       free     shared    buffers     cached
Mem:          994M       927M        66M        17M       1.8M        45M
-/+ buffers/cache:       880M       113M
Swap:           0B         0B         0B
do i need more memory? heh
Gullit Miranda
@gullitmiranda
Mar 29 2016 22:53
its possible
will the droplets on DigitalOcean don't have swap?
Lucas Gertel
@lgertel
Mar 29 2016 22:54
Trying to use the default rails azk file without success (http://docs.azk.io/en/starting-from-scratch/ruby-rails.html)
need to add puma to work
Dr Kim Foale
@kimadactyl
Mar 29 2016 22:59
i have puma in my production group
pretty sure its using it as the server
or is that a seperate problem? sorry :D
Lucas Gertel
@lgertel
Mar 29 2016 23:00
Another one.
One thing, when azk ssh into a image, should i use bundle as root to install puma?
or this is the wrong mindset
Gullit Miranda
@gullitmiranda
Mar 29 2016 23:05
did you min azk shell @lgertel ?
Lucas Gertel
@lgertel
Mar 29 2016 23:06
yeah
Gullit Miranda
@gullitmiranda
Mar 29 2016 23:06
if yes, yes, in docker it's used root
Lucas Gertel
@lgertel
Mar 29 2016 23:07
which is the best way to bootstrap this?
Gullit Miranda
@gullitmiranda
Mar 29 2016 23:07
this command need puma, but what I sent you do not need
and it should be the default, including in the documentation
you want to know what is the best way to start a rails application?
Lucas Gertel
@lgertel
Mar 29 2016 23:09
I want to know how to bootstrap the puma configuration, for example.
Consider that we have a config file that changes from environment to environment
Or start the puma server on boot, for example
Gullit Miranda
@gullitmiranda
Mar 29 2016 23:11
you can use envs, in several ways
you can use in:
  • command
  • envs
  • in source
  • ...
you need to just make the calls in different modes
Lucas Gertel
@lgertel
Mar 29 2016 23:13
the order the commands are executed are the order on the array?
Gullit Miranda
@gullitmiranda
Mar 29 2016 23:15
e.g.:
// in Azkfile
command: ["bundle", "exec", "puma", "-C", "config/puma.#{ENV.ENV_NAME}.rb"]
// in terminal
ENV_NAME=stage azk start
// the above command, run:
// bundle exec puma -C config/puma.stage.rb
Lucas Gertel
@lgertel
Mar 29 2016 23:17
great
Gullit Miranda
@gullitmiranda
Mar 29 2016 23:18
I need to take a nap now, so that waking up will be back
Lucas Gertel
@lgertel
Mar 29 2016 23:18
Getting a error with the $HTTP_PORTazk: Run system bifrost return: (1), for command: ["bundle","exec","rails","server","--pid","/tmp/rails.pid","--port=$HTTP_PORT","--binding=0.0.0.0"]:
azk: .bifrost [log] > /azk/bundler/ruby/2.3.0/gems/railties-4.2.6/lib/rails/commands/server.rb:12:in `parse!': invalid argument: --port=$HTTP_PORT (OptionParser::InvalidArgument)
ports are defined on azkfile
ports: {
http: "7000/tcp",
}
this one without puma
command: ["bundle", "exec", "rails", "server", "--pid", "/tmp/rails.pid", "--port=$HTTP_PORT", "--binding=0.0.0.0”],
Gullit Miranda
@gullitmiranda
Mar 29 2016 23:20
try change in your Azkfile:
command: ["bundle","exec","rails","server","--pid","/tmp/rails.pid","--port", "$HTTP_PORT", "--binding", "0.0.0.0"]:
Lucas Gertel
@lgertel
Mar 29 2016 23:21
command: ["bundle","exec","rails","server","--pid","/tmp/rails.pid","--port","$HTTP_PORT","--binding","0.0.0.0"]:
azk: .bifrost [log] > /azk/bundler/ruby/2.3.0/gems/railties-4.2.6/lib/rails/commands/server.rb:12:in `parse!': invalid argument: --port $HTTP_PORT (OptionParser::InvalidArgument)
:(
Dr Kim Foale
@kimadactyl
Mar 29 2016 23:22
i had the same problem and just set the port manually in the command
Lucas Gertel
@lgertel
Mar 29 2016 23:23
removed from the hash on azkfile?
Dr Kim Foale
@kimadactyl
Mar 29 2016 23:23
looking at it now i don't think puma likes the /tcp syntax
"--port", "3000"or whatever
Gullit Miranda
@gullitmiranda
Mar 29 2016 23:25
so I tested, the flag to switch the port is --port
Lucas Gertel
@lgertel
Mar 29 2016 23:25
?
Gullit Miranda
@gullitmiranda
Mar 29 2016 23:25
you can send the rails server --help?
Lucas Gertel
@lgertel
Mar 29 2016 23:26
go take a nap, don’t worry
we talk later
Gullit Miranda
@gullitmiranda
Mar 29 2016 23:28
sorry. I'm very tired at the moment.
send to me result of command azk shell -- bundle exec rails server --help that I will see as soon as you wake up
Lucas Gertel
@lgertel
Mar 29 2016 23:28
Don’t worry!
Tks btw
Dr Kim Foale
@kimadactyl
Mar 29 2016 23:29
if i get it right i dont think puma accepts "3000/tcp" as a port flag, maybe unicorn does? i think just small error if using puma instead and its building from the array?
anyway back tomrorow sleep well @gullitmiranda
:)
Lucas Gertel
@lgertel
Mar 29 2016 23:32
running rails server on the image
starts without problem
hue hue
bundle exec rails server --pid /tmp/rails.pid --port=3000 --binding=0.0.0.0
=> Booting WEBrick
=> Rails 4.2.6 application starting in development on http://0.0.0.0:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
[2016-03-29 23:35:43] INFO  WEBrick 1.3.1
[2016-03-29 23:35:43] INFO  ruby 2.3.0 (2015-12-25) [x86_64-linux]
[2016-03-29 23:35:43] INFO  WEBrick::HTTPServer#start: pid=15 port=300
Lucas Gertel
@lgertel
Mar 29 2016 23:44
azk: ↓ stopping `bifrost` system, 1 instances...
azk: Run system `bifrost` return: (0), for command: ["bundle","exec","rails","server","--pid","/tmp/rails.pid","--port=3000","--binding=0.0.0.0"]:
azk: [timeout] `azk` has timed out on `bifrost` system.
azk: [timeout] Failure to reach port `32776` from `http://bifrost.dev.azk.io` after 40000 milliseconds.
azk: [timeout] Make sure the start command binds `port` to the `0.0.0.0` interface, not only to the `localhost` interface.
azk: [timeout] You might want to edit your `Azkfile.js` in order to increase the maximum timeout.
Anyone?