habitat-sh / habitat
- четверг, 16 июня 2016 г. в 03:13:56
Rust
Modern applications with built-in automation
Want to try Habitat? Get started here.
Habitat is an application automation framework that allows you to build applications that have automation built-in. This provides modern applications that:
To learn more about Habitat, please visit the Habitat website.
The remainder of this README focuses on developers who want to modify the source code of Habitat.
docker-machine rm default
docker-machine create -d vmwarefusion --vmwarefusion-memory-size 4096 --vmwarefusion-cpu-count 2 --vmwarefusion-disk-size 40960 default
. Feel free to increase the number of CPUs, RAM, or Disk space as needed. This determines how fast you can compile the project and build software. (Adam uses 4 CPUs, 8GB of RAM)eval "$(docker-machine env default)"
to your shell initializationgit clone git@github.com:habitat-sh/habitat.git; cd habitat
make
make test
if you want to run the tests. This will take a while.Everything should come up green. Congratulations - you have a working Habitat development environment.
Note: The Makefile targets are documented. Run make help
to show the output. Habitat requires perl
.
Optional: This project compiles and runs inside Docker containers so while
installing the Rust language isn't strictly necessary, you might want a local
copy of Rust on your workstation (some editors' language support require an
installed version). To install stable
Rust, run: curl -sSf
https://static.rust-lang.org/rustup.sh | sh
. Additionally, the project
maintainers use rustfmt for
code formatting. If you are submitting changes, please ensure that your work
has been run through rustfmt. An easy way to install it (assuming you have Rust
installed as above), is to run cargo install rustfmt
and adding
$HOME/.cargo/bin
to your PATH
.
git clone git@github.com:habitat-sh/habitat.git; cd habitat
make
make test
Everything should come up green. Congratulations - you have a working Habitat development environment.
Note: The Makefile targets are documented. Run make help
to show the output. Habitat requires perl
.
Optional: This project compiles and runs inside Docker containers so while
installing the Rust language isn't strictly necessary, you might want a local
copy of Rust on your workstation (some editors' language support require an
installed version). To install stable
Rust, run: curl -sSf
https://static.rust-lang.org/rustup.sh | sh
. Additionally, the project
maintainers use rustfmt for
code formatting. If you are submitting changes, please ensure that your work
has been run through rustfmt. An easy way to install it (assuming you have Rust
installed as above), is to run cargo install rustfmt
and adding
$HOME/.cargo/bin
to your PATH
.
The Habitat Builder web application is in the components/builder-web directory. See its README for more information.
Habitat's website and documentation is generated using Middleman and is located in the www
directory of the Habitat source code. To work on the documentation, you will need to have a working Ruby installation and Bundler. We recommend Ruby 2.3.1 or greater.
To install Middleman, follow these instructions:
Change to the www
directory and type:
bundle install --path=vendor
To build the documentation, either before or after you make your change, change to the www
directory and type:
bundle exec middleman build
The documentation is built into the source
directory. You can instruct Middleman to serve the site by typing:
bundle exec middleman serve
Middleman will start a small webserver on your computer and indicate what URL you should load in your browser to preview it.
== View your site at "http://mylaptop.example.com:4567", "http://192.168.1.101:4567"
You can continue to make changes to the documentation files and Middleman will reload them live.
Ctrl-C
to terminate the webserver when you are finished working with Middleman.The Rust crates also have their own internal developer documentation. From the root of the project, type make docs
to build the internal Rust documentation.
Run make serve-docs
to run a small web server that exposes the documentation
on port 9633
. You can then read the docs at http://<DOCKER_HOST>:9633/
(with working JavaScript-based search).
make shell
cd components/x
cargo build
or cargo test
cargo run -- foobar
to pass options to the built binaryThis project utilizes a Developer Certificate of Origin (DCO) to ensure that each commit was written by the author or that the author has the appropriate rights necessary to contribute the change. The project utilizes Developer Certificate of Origin, Version 1.1
Developer Certificate of Origin
Version 1.1
Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
660 York Street, Suite 102,
San Francisco, CA 94110 USA
Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.
Developer's Certificate of Origin 1.1
By making a contribution to this project, I certify that:
(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or
(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source
license and I have the right under that license to submit that
work with modifications, whether created in whole or in part
by me, under the same open source license (unless I am
permitted to submit under a different license), as indicated
in the file; or
(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.
(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including all
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.
Each commit must include a DCO which looks like this
Signed-off-by: Joe Smith <joe.smith@email.com>
The project requires that the name used is your real name. Neither anonymous contributors nor those utilizing pseudonyms will be accepted.
Git makes it easy to add this line to your commit messages. Make sure the user.name
and
user.email
are set in your git configs. Use -s
or --signoff
to add the Signed-off-by line to
the end of the commit message.
Habitat uses several bots to automate the review and merging of pull
requests. Messages to and from the bots are brokered via the account
@thesentinels. First, we use Facebook's mention bot
to identify potential reviewers for a pull request based on the blame
information in the relevant diff. @thesentinels can also receive
incoming commands from reviewers to approve PRs. These commands are
routed to a homu bot that will
automatically merge a PR when sufficient reviewers have provided a +1
(or r+ in homu terminology).
Copyright (c) 2016 Chef Software Inc. and/or applicable contributors
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.