Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure deployment #87

Open
8 of 16 tasks
timblack1 opened this issue Oct 10, 2015 · 2 comments
Open
8 of 16 tasks

Configure deployment #87

timblack1 opened this issue Oct 10, 2015 · 2 comments
Assignees
Milestone

Comments

@timblack1
Copy link
Owner

timblack1 commented Oct 10, 2015

Deploy to Webfaction using a Travis CI deployment script.

  • Use git config receive.denyCurrentBranch=updateInstead in the production repository.
  • Fix jshint errors
  • Get correct SSH key
  • Consider using a limited access git user on the production server.
  • Consider setting singleRun: isTravis in karma per http://orizens.com/wp/topics/first-steps-in-setting-up-travis-ci-to-your-javascript-project/ to get the tests to exit without having to kill them.
  • Why do both rcl and st take up 1.2/5 GB of space? And why do they crash in production?
    • I need to monitor data/couch.log and data/couch.stdout while fixing the problem
    • Because package.json contains 'hoodie': 'latest', which now has to build PouchDB dependencies, which causes high memory usage. So, pin the pre-PouchDB version of Hoodie. Something in npm install --production also fails, causing the crontab entry which restarts the apps to output lots of errors in the data/*.{log|stdout} files.
  • Set up logrotate on CouchDB's logs.
  • Run through other parts of Hoodie's deployment guide
  • Use monit, or write an uptime monitor in Node, put it in my ~/bin dir, call it from a cron job which emails me stderr output, and checks for:
    • Does not contain "502" or "Bad Gateway"
    • Does not return a 502 HTTP status code
    • Does not contain "error"
    • Returns a 200 OK
    • Output the HTTP status code and message if it is not 200. Use a format like "{{URL}} returns '{{error}}'"
@timblack1 timblack1 added this to the 0.1 milestone Oct 10, 2015
@timblack1
Copy link
Owner Author

Note errors:

Running gulp default...
[22:39:30] Local gulp not found in ~/build/timblack1/rcl
[22:39:30] Try running: npm install gulp

Fix problem where jshint errors prevent gulp default from building the deployment build.

Identity added: /home/travis/.ssh/id_dsa (/home/travis/.ssh/id_dsa)
ssh: connect to host timblack1.webfactional.com port 22: Connection timed out
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.

TODO: Is the DSA key I'm using the right one to use?

Remove unnecessary parts of before_deploy.

Error:

Identity added: /home/travis/.ssh/id_dsa (/home/travis/.ssh/id_dsa)
Testing SSH authentication...
OpenSSH_5.9p1 Debian-5ubuntu1.4, OpenSSL 1.0.1 14 Mar 2012
debug1: Reading configuration data /etc/ssh/ssh_config

debug1: /etc/ssh/ssh_config line 19: Applying options for *

debug2: ssh_connect: needpriv 0

debug1: Connecting to timblack1.webfactional.com [75.126.183.210] port 22.

debug1: Connection established.

debug1: identity file /home/travis/.ssh/id_rsa type -1

debug1: identity file /home/travis/.ssh/id_rsa-cert type -1

debug3: Incorrect RSA1 identifier

debug3: Could not load "/home/travis/.ssh/id_dsa" as a RSA1 public key

Note that the following works correctly:

debug3: load_hostkeys: found key type RSA in file /home/travis/.ssh/known_hosts:7

debug3: load_hostkeys: loaded 1 keys

debug1: Host 'timblack1.webfactional.com' is known and matches the RSA host key.

debug1: Found key in /home/travis/.ssh/known_hosts:6

debug2: bits set: 517/1024

debug1: ssh_rsa_verify: signature correct
debug3: sign_and_send_pubkey: DSA fc:85:90:b6:4c:72:f4:71:50:86:03:c6:8d:e3:83:e2

debug1: Authentication succeeded (publickey).

Authenticated to timblack1.webfactional.com ([75.126.183.210]:22).

The call to ls worked also:

backups
bin
cron
DansWork
env
etc
find-certificates.sh
include
lib
logs
man
passwords
sbin
share
src
tmp
var
webapps

Then we get lots and lots of the last two statements below:

Transferred: sent 2992, received 2624 bytes, in 1.5 seconds
Bytes per second: sent 1934.9, received 1696.9
debug1: Exit status 0
travis_fold:end:dpl.3
bower_components/accessibility-developer-tools/.bower.json already exists, no checkout
bower_components/accessibility-developer-tools/Changelog.md already exists, no checkout

Then the build fails because the log has grown too long. Can the output of the lines like the last two statements above be silenced? It seems to be the output of git push deploy master, which could just be redirected to /dev/null.

@timblack1 timblack1 reopened this Oct 13, 2015
@timblack1 timblack1 self-assigned this Oct 23, 2015
@timblack1
Copy link
Owner Author

I redirected the unnecessary output to /dev/null in recent commits.

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

No branches or pull requests

1 participant