submission service #9

Description

This web service accepts and validates Checkbox submissions
before passing them on to a C3 web service for further processing.

Overview

This charm provides the Submission Service.
This service accepts and validates Checkbox submissions before passing
them on to a C3 service for further processing.

Usage

The submission-service is available as a snap, and it can be passed to this charm
as a resource or the layer-snap will download it from the snap store for us::

Command to deploy the service from the snap store::

juju deploy cs:~codersquid/submission-service

Command to deploy the service from a local resource::

juju deploy cs:~codersquid/submission-service --resource submission-service=/path/to/submission-service.snap

Commands to configure and deploy a minimal stack for the service.

juju deploy postgresql
juju deploy apache2
juju expose apache2
juju add-relation submission-service:database postgresql:db-admin
juju add-relation submission-service:website apache2:reverseproxy
# set config values as appropriate. these are examples
juju config submission-service\
    swift_container=submissionservice_test\
    swift_tenant=codersquid_project\
    swift_region=myregion\
    swift_auth_url=https://keystonehost/v2.0/\
    swift_api_key=FAKE_API_KEY\
    swift_user=codersquid\
    c3_user=codersquid\
    c3_api_key=FAKE_C3_KEY

Note: the db-admin relation is needed for the PostgreSQL service currently to
avoid object ownership issues.

Once the hooks and reactions have run their course, you should be able to
request version information to see that the service is responding.::

juju expose submission-service # if you want to hit the service directly
curl http://<unit_address>:8080/1.0/version
{"result":true,"code":"","message":"ok","version":"1.0"}

Contact Information

project https://launchpad.net/hexr
bug tracker https://bugs.launchpad.net/hexr

Configuration

c3_api_key
(string) Certification API key
c3_submission_url
(string) Certification submission URL
https://certification.canonical.com/api/v1/submit/submission
swift_api_key
(string) Swift API key
snap_proxy
(string) HTTP/HTTPS web proxy for Snappy to use when accessing the snap store.
swift_tenant
(string) Swift tenant
c3_user
(string) Certification user
swift_user
(string) Swift username
submission_environment
(string) A label for the environment where the service is deployed
dev
swift_auth_url
(string) Swift Auth URL
c3_status_url
(string) Certification status URL
https://certification.canonical.com/submissions/status/
submission_version
(string) Version of the service
1.0
swift_region
(string) Swift region
submission_service_port
(int) Port of the Submission Service
8080
swift_container
(string) Name of Swift container where submissions are stored