@@ -13,6 +13,72 @@ Intecture's APIs (_cough_ and a binary) are the heart and soul of Intecture. Che
1313- [ proj] ( proj/ ) - Helpers and boilerplate for building Intecture projects
1414- [ agent] ( agent/ ) - Tiny daemon that exposes the core API as a service (for your hosts!)
1515
16+ ## Getting started
17+
18+ Intecture is pretty light on external dependencies. In fact, all you'll need to [ get started is Rust] ( https://www.rust-lang.org/install.html ) !
19+
20+ Once you've installed Rust, create a new Cargo binary project:
21+
22+ ```
23+ cargo new --bin
24+ ```
25+
26+ Next, add Intecture to your ` Cargo.toml ` :
27+
28+ ```
29+ [dependencies]
30+ futures = "0.1"
31+ intecture_api = {git = "https://github.com/intecture/api", version = "0.4"}
32+ tokio-core = "0.1"
33+ ```
34+
35+ This is all we need to do if we only want to manage the local machine. Just make sure you use the ` Local ` host type, like so:
36+
37+ ``` rust
38+ let host = Local :: new (). and_then (| host | {
39+ // Do stuff on the local host...
40+ });
41+ ```
42+
43+ You can find some basic examples here: [ core/examples] ( core/examples ) .
44+ Also you should refer to the API docs: [ intecture.io/api/intecture_api/] ( http://intecture.io/api/intecture_api/ )
45+
46+ #### For remote hosts only
47+
48+ To manage a remote machine with Intecture, you need to take a few extra steps. On the remote machine...
49+
50+ [ Install Rust] ( https://www.rust-lang.org/install.html ) .
51+
52+ Clone this GitHub repository:
53+
54+ ```
55+ git clone https://github.com/intecture/api
56+ ```
57+
58+ Build the project:
59+
60+ ```
61+ cd api && cargo build --release
62+ ```
63+
64+ Then run the agent, specifying an address to bind to:
65+
66+ ```
67+ target/release/intecture_agent --address 0.0.0.0:7101
68+ ```
69+
70+ Remember, the agent _ must_ be running in order for the API to connect to this host.
71+
72+ Finally we can get back to what we came here for - Rust codez! To manage this machine, make sure you use the ` Plain ` remote host type, like so:
73+
74+ ``` rust
75+ let host = Plain :: connect (" <ip_of_host>:7101" ). and_then (| host | {
76+ // Do stuff on the local host...
77+ });
78+ ```
79+
80+ Note the type is ` Plain ` , rather than ` Remote ` . At the moment, ** Intecture does no encryption** , making it unsafe for use over insecure networks (i.e. the internet). The type ` Plain ` signifies this. In the future we will add support for encrypted remote host types as well, but for now, we cannot recommend strongly enough that you only use this on a secure local network.
81+
1682## What's new?
1783
1884Check out [ RELEASES.md] ( RELEASES.md ) for details.
0 commit comments