├── .gitignore ├── taco.png ├── collaborators.md ├── package.json └── readme.md /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | deploys 3 | example 4 | .DS_Store 5 | -------------------------------------------------------------------------------- /taco.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/max-mapper/taco/HEAD/taco.png -------------------------------------------------------------------------------- /collaborators.md: -------------------------------------------------------------------------------- 1 | ## Collaborators 2 | 3 | taco is only possible due to the excellent work of the following collaborators: 4 | 5 | 6 | 7 |
maxogdenGitHub/maxogden
mafintoshGitHub/mafintosh
8 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "taco", 3 | "version": "2.0.0", 4 | "description": "a modular deployment system for unix", 5 | "main": "index.js", 6 | "bin": { 7 | "taco": "cli.js" 8 | }, 9 | "author": "max ogden", 10 | "license": "BSD", 11 | "dependencies": {}, 12 | "devDependencies": {}, 13 | "repository": { 14 | "type": "git", 15 | "url": "https://github.com/maxogden/taco.git" 16 | }, 17 | "bugs": { 18 | "url": "https://github.com/maxogden/taco/issues" 19 | }, 20 | "homepage": "https://github.com/maxogden/taco" 21 | } 22 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | # taco 2 | 3 | a modular deployment system for unix 4 | 5 | ![taco.png](taco.png) 6 | 7 | ### about 8 | 9 | taco is a set of compatible command line tools for packaging, building and deploying programs. 10 | 11 | eventually this repository will house a higher level CLI tool, `taco`, but for now it is just documentation for the individual taco components 12 | 13 | the taco philosophy is: 14 | 15 | - use tarballs to package programs 16 | - use separate, well defined tools for transforming or deploying tarballs (do one thing well) 17 | - use unix principles so tools compose nicely (e.g. `taco-pack . | ssh myserver taco-build "npm install"` ) 18 | - make it easy for users to customize their deploy pipelines and implement their own tools 19 | 20 | ### components 21 | 22 | each of these is a separate module. you can use them all, or use the ones you like and write your own missing components. 23 | 24 | - [`taco-pack`](https://npmjs.org/taco-pack) - creates tarball of a program 25 | - [`taco-build`](https://npmjs.org/taco-build) - takes a tarball, runs a build script inside it, and outputs a tarball 26 | - [`taco-mon`](https://npmjs.org/taco-mon) - deploys your program and runs it with the [mon](https://github.com/tj/mon) process monitor 27 | - [`taco-nginx`](https://npmjs.org/taco-nginx) - updates nginx configuration to route `.*` subdomain traffic to your program, then starts your programs process 28 | 29 | if you write a new tool that works well with the taco stack, publish it to npm as `taco-` and send us a pull request adding it to this list. we also encourage you to [open an issue](https://github.com/maxogden/taco/issues) with your idea first to get feedback from the taco community before implementing. 30 | 31 | examples of other tools that could be written are `taco-docker`, `taco-upstart`, or `taco-torrent`. 32 | 33 | ## example 34 | 35 | on client: 36 | 37 | make sure your program has a `package.json` with a `name` and a `start` script. 38 | 39 | ```json 40 | { 41 | "name": "my-cool-server", 42 | "scripts": { 43 | "start": "node server.js" 44 | } 45 | } 46 | ``` 47 | 48 | then you just pack up your program and pipe the tarball to your server somehow. 49 | 50 | here we are using [webcat](http://npmjs.org/webcat) but you can use ssh, rsync, scp, etc: 51 | 52 | ``` 53 | $ taco-pack . | webcat maxogden 54 | ``` 55 | 56 | on server: 57 | 58 | ``` 59 | $ webcat maxogden | taco-build "npm install --production" | taco-mon deploy . 60 | ``` 61 | 62 | here is the full output of deploying [hello-world-server](https://github.com/maxogden/hello-world-server) locally: 63 | 64 | ``` 65 | ~/taco 🐈 taco-pack ~/src/js/hello-world-server > server.tar 66 | ~/taco 🐈 taco-build "npm install --production" < server.tar > server-built.tar 67 | hat@0.0.3 node_modules/hat 68 | ~/taco 🐈 ls -alh *.tar 69 | -rw-r--r-- 1 maxogden staff 21K Apr 20 10:37 server-built.tar 70 | -rw-r--r-- 1 maxogden staff 4.5K Apr 20 10:37 server.tar 71 | ~/taco 🐈 taco-mon deploy . < server-built.tar 72 | Finished deploying 73 | ~/taco 🐈 taco-mon status 74 | hello-world-server: alive, started just now 75 | ~/taco 🐈 tree -L 3 76 | . 77 | ├── deploys 78 | │ └── hello-world-server -> ../versions/hello-world-server-1429551456725 79 | ├── server-built.tar 80 | ├── server.tar 81 | └── versions 82 | └── hello-world-server-1429551456725 83 | ├── index.js 84 | ├── node_modules 85 | ├── package.json 86 | ├── readme.md 87 | ├── taco.log 88 | ├── taco.mon.pid 89 | └── taco.pid 90 | 91 | 5 directories, 8 files 92 | ``` 93 | 94 | ## folder structure 95 | 96 | taco deployment modules, such as `taco-mon`, should use the following folder structure: 97 | 98 | ``` 99 | versions/ 100 | myapp-1429547612075/ 101 | myapp.pid # \ 102 | myapp.stderr.log # - pids and logs created by taco-mon 103 | myapp.stdout.log # / 104 | package.json # from tarball, must exist for process to be deployable 105 | # ... and the rest of the process files from the tarball are here too 106 | deployed/ 107 | myapp/ -> ../builds/myapp-1429547612075/ # symlink 108 | ``` 109 | --------------------------------------------------------------------------------