Skip to content
This repository has been archived by the owner on Jul 24, 2021. It is now read-only.

Commit

Permalink
Merge pull request #967 from joyent/ether/v3-b3-yet-more-fixes
Browse files Browse the repository at this point in the history
v3 b3 yet more fixes
  • Loading branch information
karenetheridge authored Dec 13, 2019
2 parents b0a3849 + 479d17a commit be6e63c
Show file tree
Hide file tree
Showing 80 changed files with 398 additions and 2,209 deletions.
28 changes: 14 additions & 14 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@ FROM ubuntu:bionic
ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update && \
apt-get upgrade -y --no-install-recommends && \
apt-get install -y --no-install-recommends \
build-essential \
ca-certificates \
carton \
curl \
git \
libssl-dev \
libzip-dev \
perl-doc \
unzip \
postgresql \
libpq-dev \
&& apt-get clean
apt-get upgrade -y --no-install-recommends && \
apt-get install -y --no-install-recommends \
build-essential \
ca-certificates \
carton \
curl \
git \
libssl-dev \
libzip-dev \
perl-doc \
unzip \
postgresql \
libpq-dev \
&& apt-get clean

RUN mkdir -p /app/conch
WORKDIR /app/conch
Expand Down
28 changes: 14 additions & 14 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@ FROM ubuntu:bionic
ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update && \
apt-get upgrade -y --no-install-recommends && \
apt-get install -y --no-install-recommends \
build-essential \
ca-certificates \
carton \
curl \
git \
libssl-dev \
libzip-dev \
perl-doc \
unzip \
postgresql \
libpq-dev \
&& apt-get clean
apt-get upgrade -y --no-install-recommends && \
apt-get install -y --no-install-recommends \
build-essential \
ca-certificates \
carton \
curl \
git \
libssl-dev \
libzip-dev \
perl-doc \
unzip \
postgresql \
libpq-dev \
&& apt-get clean

RUN mkdir -p /app/conch
WORKDIR /app/conch
Expand Down
8 changes: 4 additions & 4 deletions docker/buildbot-prerelease.bash
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ IFS=$'\n\t'
PREFIX=${PREFIX} LABEL=${LABEL} docker/builder.sh --file Dockerfile.dev .

docker run \
--mount type=volume,src=${PREFIX}-conch-api-carton,dst=/app/conch/local \
--rm \
--name ${PREFIX}_${BUILDNUMBER} \
${PREFIX}/conch-api:${LABEL}
--mount type=volume,src=${PREFIX}-conch-api-carton,dst=/app/conch/local \
--rm \
--name ${PREFIX}_${BUILDNUMBER} \
${PREFIX}/conch-api:${LABEL}
10 changes: 5 additions & 5 deletions docker/buildbot-release.bash
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ LABEL=$(echo "${LABEL}" | sed 's/\//_/g')
PREFIX=${PREFIX} LABEL=${LABEL} docker/builder.sh --no-cache --file Dockerfile .

docker run \
--name ${PREFIX}_${BUILDNUMBER} \
--rm \
--entrypoint=make \
${PREFIX}/conch-api:${LABEL} \
test
--name ${PREFIX}_${BUILDNUMBER} \
--rm \
--entrypoint=make \
${PREFIX}/conch-api:${LABEL} \
test
10 changes: 5 additions & 5 deletions docker/builder.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ HASH=`git rev-parse HEAD`
LABEL=$(echo "${LABEL}" | sed 's/\//_/g')

docker build \
--force-rm \
-t ${PREFIX}/conch-api:${LABEL} \
--build-arg VERSION=${TAG} \
--build-arg VCS_REF=${HASH} \
$@
--force-rm \
-t ${PREFIX}/conch-api:${LABEL} \
--build-arg VERSION=${TAG} \
--build-arg VCS_REF=${HASH} \
$@
6 changes: 3 additions & 3 deletions docker/dev_test.bash
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ docker volume create ${PREFIX}-api-test-carton
PREFIX=${PREFIX} docker/builder.sh --file Dockerfile.dev .

docker run \
--mount type=volume,src=${PREFIX}-api-test-carton,dst=/app/conch/local \
--rm \
${PREFIX}/conch-api
--mount type=volume,src=${PREFIX}-api-test-carton,dst=/app/conch/local \
--rm \
${PREFIX}/conch-api
21 changes: 4 additions & 17 deletions docs/_resources/full-schema.er
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
# Cardinality Syntax
# 0 or 1 ?
# exactly 1 1
# 0 or more * (primary key)
# 1 or more + (foreign key)
# 0 or more * (marks primary key on table declaration)
# 1 or more + (marks foreign key on table declaration)


title {label: "Conch database schema (as of v3.0.0-b1, 2019-10-21)", size: "50"}
Expand Down Expand Up @@ -204,11 +204,6 @@ deactivated
*+build_id
role {label: "ro, rw, admin"}

[organization_workspace_role] {bgcolor: "#d0e0d0"}
*+organization_id
*+workspace_id
role {label: "ro, rw, admin"}

[rack] {bgcolor: "#fcecec"}
*id
+datacenter_room_id
Expand Down Expand Up @@ -247,6 +242,7 @@ deactivated
created
updated
last_seen
+user_id

[user_account] {bgcolor: "#d0e0d0"}
*id
Expand All @@ -271,12 +267,6 @@ role {label: "ro, rw, admin"}
*+organization_id
role {label: "ro, rw, admin"}

[user_relay_connection] {bgcolor: "#d0e0d0"}
*+user_id
*+relay_id
first_seen
last_seen

[user_session_token] {bgcolor: "#d0e0d0"}
*id
+user_id
Expand Down Expand Up @@ -378,19 +368,16 @@ hardware_product *--1 validation_plan
hardware_product *--1 hardware_vendor
organization_build_role *--1 build
organization_build_role *--1 organization
organization_workspace_role *--1 organization
organization_workspace_role *--1 workspace
rack *--? build
rack *--1 datacenter_room
rack_layout *--1 hardware_product
rack_layout *--1 rack
rack *--1 rack_role
relay +--1 user_account
user_build_role +--1 build
user_build_role *--1 user_account
user_organization_role +--1 organization
user_organization_role *--1 user_account
user_relay_connection *--1 relay
user_relay_connection *--1 user_account
user_session_token *--1 user_account
user_setting *--1 user_account
user_workspace_role *--1 user_account
Expand Down
Binary file modified docs/images/full-schema.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 12 additions & 18 deletions docs/json-schema/request.json
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@
"$ref" : "common.json#/definitions/device_serial_number"
},
"sku" : {
"type" : "string"
"$ref" : "common.json#/definitions/mojo_standard_placeholder"
}
},
"required" : [
Expand Down Expand Up @@ -384,7 +384,17 @@
},
"DeviceSettings" : {
"additionalProperties" : {
"$ref" : "common.json#/definitions/non_empty_string"
"anyOf" : [
{
"$ref" : "common.json#/definitions/non_empty_string"
},
{
"type" : "number"
},
{
"type" : "boolean"
}
]
},
"minProperties" : 1,
"propertyNames" : {
Expand Down Expand Up @@ -1108,22 +1118,6 @@
},
"type" : "object"
},
"WorkspaceAddOrganization" : {
"additionalProperties" : false,
"properties" : {
"organization_id" : {
"$ref" : "common.json#/definitions/uuid"
},
"role" : {
"$ref" : "common.json#/definitions/role"
}
},
"required" : [
"organization_id",
"role"
],
"type" : "object"
},
"WorkspaceAddRack" : {
"additionalProperties" : false,
"properties" : {
Expand Down
Loading

0 comments on commit be6e63c

Please sign in to comment.