petejkim / autoparts Goto Github PK
View Code? Open in Web Editor NEWpackage manager for nitrous.io
License: BSD 2-Clause "Simplified" License
package manager for nitrous.io
License: BSD 2-Clause "Simplified" License
$ ghci
GHCi, version 7.8.3: http://www.haskell.org/ghc/ :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... : can't load .so/.DLL for: libgmp.so (libgmp.so: cannot open shared object file: No such file or directory)
Any javascript based headless testing is impossible without it
parts list
mongodb (2.4.6)
php5 (5.5.8-nitrous2)
apache2 (2.4.6, 2.4.7*)
*
indicates selected version
parts which
- list selected versionsmongodb 2.4.6
php5 5.5.8-nitrous2
apache2 2.4.7
parts which apache2
apache2 2.4.7
parts switch apache2 2.4.6
- activate older version for useparts uninstall apache2 --version 2.4.6
parts purge apache2 --version 2.4.6
parts upgrade
- upgrade all outdated installationsparts cleanup
- remove all unselected old versionsFor example, some tools such as ack-grep
or parse
doesnt provide a tar file, but a single file that we can rename and used
curl http://beyondgrep.com/ack-2.08-single-file > ~/bin/ack && chmod 0755 !#:3
I think probably we can add source_filetype: binary
option, which tell parts will skip the file extraction process. Any thoughts ?
I think it's logical
mysql uses cmake to build
Would be good to be able to check for status of services running something like
parts status package_name - get status of specific service
parts status - get status of all installed services
Mosh makes remote logins much more robust and reliable, with support for changing IP's, reduces lag (by intelligently updating the local screen immediately).
Build instructions: http://mosh.mit.edu/#build-instructions
While it is possible to install mosh server into a users home directory, it is easier to use, if it's installed in a system path.
At the time of this post, 5.6.4 is the latest stable version. There are some features in 5.6 that aren't game-changing, but certainly would be nice to have (variadic functions and argument unpacking being the two that caused me to raise this issue).
Add MariaDB in addition to MySQL
there's one in ~/.parts/lib created by autoparts package
and there's another one in ~/.parts/etc
use the ~/.parts/etc one
You know i had to ask... :D
Add python and nodejs so I can run them both in one container.
There have been a few requests to add the eb tool. http://aws.amazon.com/code/6752709412171743
I would like to use Nitrous as a replacement to my local LAMP stack for PHP development. To do this, I need to be able to use XDebug. Is this possible?
"parts upgrade" isn't there yet because we didn't have the need for it for version 1, but I think we need it now.
Are we going to support multiple versions like rubygems? Homebrew doesn't do this, they just keep latest versions on its repo and if multiple versions are absolutely necessary (python package for example) they just have different packages like: python
, python3
...
If we were to support multiple versions (could be good for Gemfile-like Partsfile later) I was thinking about doing something like this:
class Ack3_0 < Package
name 'ack'
version '3.0'
source_url ...
...
end
class Ack2_5 < Ack3_0
version '2.5'
source_url ...
...
# inherits build steps from parent class
# override build steps if necessary
end
class Ack2_0 < Ack2_5
version '2.0'
source_url ...
...
end
What do you think?
Currently Google App Engine for Python (dev_appserver.py) is the only version available. The Go version (goapp) is being requested for Go developers:
The current version (6.8.8-7) is no longer available:
http://www.imagemagick.org/download/
It seems they're only distributing 6.9.1-5 now.
The following fails after a restart because pid isn't cleaned up correctly on box shut down.
https://github.com/nitrous-io/autoparts/blob/master/lib/autoparts/packages/apache2.rb#L85
def running?
pid = Path.var + name + "run" + "httpd.pid"
pid.exist?
end
Do something like this instead:
https://github.com/nitrous-io/autoparts/blob/master/lib/autoparts/packages/mongodb.rb#L84
def running?
if mongod_pid_file_path.exist?
pid = File.read(mongod_pid_file_path).strip
if pid.length > 0 && `ps -o cmd= #{pid}`.include?(mongod_path.basename.to_s)
return true
end
end
false
end
Currently when a new version is released, installing the part will leave the old version behind. At this point, running parts uninstall meteor
(or whichever part) will not uninstall the old version.
There needs to be a uninstall procedure before installing the latest version which was introduced in Autoparts.
I might be missing something obvious here, but:
_~/workspace$ parts install postgresql_
=> Downloading https://nitrousio-autoparts-use1.s3.amazonaws.com/postgresql-9.2.4-binary.tar.gz...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 9949k 100 9949k 0 0 1696k 0 0:00:05 0:00:05 --:--:-- 2256k
=> Verifying archive...
=> Extracting archive...
=> Installing...
The files belonging to this database system will be owned by user "action".
This user must also own the server process.
The database cluster will be initialized with locale "en_US.UTF-8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".
fixing permissions on existing directory /home/action/.parts/var/postgresql ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 24MB
creating configuration files ... ok
creating template1 database in /home/action/.parts/var/postgresql/base/1 ... ok
initializing pg_authid ... ok
initializing dependencies ... ok
creating system views ... ok
loading system objects' descriptions ... ok
creating collations ... ok
creating conversions ... ok
creating dictionaries ... ok
setting privileges on built-in objects ... ok
creating information schema ... ok
loading PL/pgSQL server-side language ... ok
vacuuming database template1 ... ok
copying template1 to template0 ... ok
copying template1 to postgres ... ok
WARNING: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the option -A, or
--auth-local and --auth-host, the next time you run initdb.
Success. You can now start the database server using:
/home/action/.parts/packages/postgresql/9.2.4/bin/postgres -D /home/action/.parts/var/postgresql
or
/home/action/.parts/packages/postgresql/9.2.4/bin/pg_ctl -D /home/action/.parts/var/postgresql -l logfile start
_~/workspace$ parts start postgresql_
=> Starting postgresql...
parts: ERROR: "/home/action/.parts/bin/pg_ctl -D /home/action/.parts/var/postgresql -l /home/action/.parts/var/log/postgresql/postgresql.log -w start" failed
Aborting!
For example, I have postgresql running in my box. How do I connect it to a rails app with pg as database?
The standard step of running rake db:create:all
results in:
$ FATAL: role "cpursley" does not exist
.........
$ Couldn't create database for {"adapter"=>"postgresql", "encoding"=>"unicode",
"database"=>"app_test", "pool"=>5, "username"=>"cpursley", "password"=>nil}
Nitrous installs Rust 0.9, how can we get/update the latest Rust nightly in your Nitrous box?
Using these commands:
strace -o strace.log php --version
grep php.ini strace.log
it shows that php cli is loading ext from:
open("/home/action/.parts/etc/php5/php.ini/php-cli.ini", O_RDONLY) = -1 ENOTDIR (Not a di
rectory)
open("/home/action/.parts/packages/php5/5.5.11/bin/php.ini", O_RDONLY) = -1 ENOENT (No su
ch file or directory)
open("/home/action/.parts/etc/php5/php.ini/php.ini", O_RDONLY) = -1 ENOTDIR (Not a direct
ory)
which is very different from the location we tell php to look for config i.e. /home/action/.parts/etc/php5/php.ini
Not sure if this is the best place to post this, this would be an enhancement. It would be great if you guys could somehow version templates in the interface and post the changelogs for those templates. For example, if you make a change to the PHP template which botches something, then you might create a problem for everyone relying on that botched item when creating a new box. I would like to be able to select a certain template version that I know is working for me. Developers need to rely on an environment which doesn't change. If a problem appears, then I have to wonder if it's something I did or if something in the environment changed.
It would be really great if you added ftp packages as autoparts
It'd be great to have Rust to make it nice to try out the new language.
As described on #10.
Add Codova to Autoparts https://cordova.apache.org/#download . The Ionic Framework examples ( https://github.com/driftyco/ionic-weather ) utilize this.
It would be awesome to have it...
This is likely a deployment issue rather than code. The prebuilt zsh 5.0.5 installed via
parts install zsh
does not include file definitions for command completion. If you force an install from source
parts install zsh --source
then completion is correctly installed
~ 1 $ echo $fpath
/home/action/.parts/packages/zsh/5.0.5/share/zsh/site-functions /home/action/.parts/share/zsh/functions
~ 2 $ ls $fpath[2]
_a2ps _flex _pax _tpb
_a2utils _floppy _pbm _tpconfig
...
You can:
1- Install postgresql
2- Start it
3- ....
4- Uninstall postgresql (notice i forgot to stop the server)
5- Postgresql is still running but message says it was uninstalled
You can install it again even process being executed
parts uninstall should stop the server or at least ask you to do it
Not sure that it is a good case for autoparts but some plugins like https://github.com/Valloric/YouCompleteMe
requires more recent version of vim than the one which comes with ubuntu.
Not sure how to contribute a package because most packages are using binary path which is nitrous s3. Is there a way to upload it there somehow?
Commands i've run to compile the latest vim on a nitrobox
hg clone https://vim.googlecode.com/hg/ vim
cd vim
./configure --with-features=huge
make
The only thing left here is to add the new vim to the PATH to replace the old one.
Which might be an interesting issue because usually it's done using sudo make install
which I can't ran on the box due to lack of sudo permissions.
Using easyrtc for webrtc development, but this is probably needed for a majority of webrtc. Needing an autoparts for turn server; google has a free one: https://code.google.com/p/rfc5766-turn-server/
Tried to install, but asking for superuser privileges.
action@rube-27252:~$ parts update
=> Pulling latest changes...
From https://github.com/action-io/autoparts
Usage: parts COMMAND [ARGS...]
Some useful commands are:
parts install PACKAGE... # Install one or many packages
parts uninstall PACKAGE... # Uninstall one or many packages
parts list # List all installed packages
parts search [SEARCH_TERM] # Search for a package or list all available packages
parts start PACKAGE... # Start one or many services provided by packages
parts stop PACKAGE... # Stop one or many services provided by packages
parts restart PACKAGE... # Restart one or many services provided by packages
parts update # Update Autoparts
action@rube-27252:~$ parts list
parts: no installed package found
https://github.com/visionmedia/git-extras
Nice utility for those who manage git repos at Nitrous boxes..
I can Install mysql and mongodb with this command below.
parts install mysql
parts install mongodb
Howerver, I can't install meteor in the same way.
parts install meteor
Is it not implemented yet, by any chance?
greetings,
tried installing gcs, but i got a sha1 error
=> Downloading https://dl.google.com/dl/cloudsdk/release/google-cloud-sdk.tar.gz...
eceived % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 955k 0 0 1422k 0 --:--:-- --:--:-- --:--:-- 1715k
parts: ERROR: SHA1 verification failed
Aborting!
This is the error message returned:
action@hasty-dagger-82-183319:~/rails_rss_reader(master)$ parts install postgresql
=> Downloading http://parts.nitrous.io/postgresql-9.3.5-binary.tar.gz...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 41 100 41 0 0 1108 0 --:--:-- --:--:-- --:--:-- 2157
(23) Failed writing body
parts: ERROR: "curl http://parts.nitrous.io/postgresql-9.3.5-binary.sha1 -L -o /home/action/.parts/tmp/postgresql-9.3.5-binary.sha1.partsdownload" failed
Aborting!
Or.. autoparts install to add to a Python Box
The new Go major release, Go 1.4, may be used in the near future as the default for App Engine apps on Google Cloud, so it would make sense to allow the new Go version to be installed via Autoparts, as it is backwards compatible.
Download (http://golang.org/dl/):
There have been requests to add postGIS with GEOS library.
There has been requests to add the Google Cloud SDK (which contains the Python App Engine).
This is a great asset for new and experienced Rails developers.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.