xref: /conch/
Name Date Size #Lines LOC

..21-Feb-2019-

bin/H25-Sep-2019-

dev/H24-Jul-2019-

docker/H11-Sep-2019-

docs/H15-Oct-2019-

etc/H01-Nov-2018-

json-schema/H16-Oct-2019-

lib/H12-Oct-2019-

misc/H09-Oct-2019-

report/H24-Jul-2019-

smf/H24-Jul-2019-

sql/H09-Oct-2019-

t/H09-Oct-2019-

templates/email/H30-Apr-2019-

.dockerignoreH A D24-Jul-201915 32

.gitattributesH A D24-Jul-2019543 87

.mailmapH A D08-Aug-2018438 87

.perlcriticrcH A D21-Jul-201845 21

.perltidyrcH A D21-Jul-201814 43

CODEOWNERSH A D25-Sep-2019398 108

DockerfileH A D24-Jul-2019849 4232

Dockerfile.devH A D24-Jul-2019833 4333

LICENSEH A D27-Apr-201916.3 KiB374293

MakefileH A D13-Sep-20191.8 KiB6547

README.mdH A D12-Oct-20192.9 KiB11375

conch.conf.distH A D11-Sep-20195.6 KiB144119

cpanfileH A D09-Oct-20193.8 KiB112101

cpanfile.snapshotH A D21-Sep-2019121.2 KiB4,1684,167

docker-compose.ymlH A D24-Jul-20191,008 4743

schema-loader.yamlH A D25-Sep-2019672 3423

README.md

1# Conch API Server
2
3Conch helps you build and manage datacenters.
4
5Conch's goal is to provide an end-to-end solution for full datacenter resource
6lifecycle: from design to initial power-on to end-of-life for all components of
7all devices.
8
9Conch is open source, licensed under MPL2.
10
11[More documentation can be found here.](https://joyent.github.io/conch/)
12
13## Caveat Emptor
14
15The API is in a constant state of flux. Contact the development team before
16attempting to use it directly.
17The [conch shell](https://github.com/joyent/conch-shell) is our current stable interface.
18
19## Installation
20
21### Operating System Support
22
23We currently support SmartOS 17.4 and Docker/Ubuntu. Being a Perl app, the API
24should run most anywhere but the code is only actively tested on SmartOS and
25Docker/Ubuntu.
26
27### Perl Support
28
29The API is only certified to run against Perl 5.26.
30
31### Setup
32
33Below is a list of useful Make commands that can be used to build and run the
34project. All of these should be run in the top level directory.
35
36* `make run` -- Build the project and run it
37* `make test` -- Run tests
38* `make migrate-db` -- Run database migrations
39
40#### Needed Packages
41
42* PostgreSQL 10.10
43* Git
44* Perl, 5.26 or above (e.g. via [perlbrew](https://perlbrew.pl/))
45* [Carton](https://metacpan.org/dist/Carton)
46
47#### Configuration
48
49Copy `conch.conf.dist` to `conch.conf`, modifying for any local parameters,
50including database connectivity information.
51
52### Starting Conch
53
54* `make run`
55
56## Docker
57
58### Compose
59
60The most simple way to get going with the Conch API is to use Docker Compose.
61
62#### Build
63
64First, build the image locally using `docker/builder.sh`
65
66#### First Run
67
68Copy `conch.conf.dist` to `conch.conf`, modifying for any local parameters.
69Specifically search for 'docker' in the comments. Ignore the database
70parameters.
71
72
73```
74# Edit compose file for desired release
75docker-compose up -d postgres # initialize the postgres database
76docker-compose run --rm web bin/conch-db all --username conch --email conch@example.com --password kaewee3hipheem8BaiHoo6waed7pha
77docker-compose run --rm web bin/conch-db create-global-workspace
78docker-compose up -d
79```
80
81#### Upgrading
82
83```
84docker-compose down
85# Edit compose file for desired release
86docker-compose pull
87docker-compose up -d postgres
88docker-compose run --rm web bin/conch-db migrate
89docker-compose up -d
90```
91
92There may be extra commands to run, depending on the specific release. In that
93case, the upgrade will look something like:
94
95```
96docker-compose down
97# Edit compose file for desired release
98docker-compose pull
99docker-compose up -d postgres
100docker-compose run --rm web bin/conch-db migrate
101docker-compose run --rm web bin/conch upgrade_release_225
102docker-compose up -d
103```
104
105
106## Licensing
107
108Copyright Joyent, Inc.
109
110This Source Code Form is subject to the terms of the Mozilla Public License,
111v.2.0. If a copy of the MPL was not distributed with this file, You can obtain
112one at <http://mozilla.org/MPL/2.0/>.
113