Skip to content

Commit

Permalink
Merge d1746bc into 83fec59
Browse files Browse the repository at this point in the history
  • Loading branch information
kkellerlbl committed Apr 12, 2019
2 parents 83fec59 + d1746bc commit 9f63c8d
Show file tree
Hide file tree
Showing 42 changed files with 3,931 additions and 3,610 deletions.
5 changes: 2 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
sudo: required
language: python
python:
- '2.7'
- '3.6'
services:
- docker

Expand All @@ -12,7 +12,7 @@ before_install:
- mongo --eval "printjson(db.serverStatus())"

install:
- pip install -r travis_requirements.txt
- pip install -r requirements.txt
- pip install python-coveralls
- pip install coverage
- cd ..
Expand All @@ -25,7 +25,6 @@ install:
- docker images
- export PATH=$(pwd)/bin:$PATH
- cd ../catalog
- make

script:
- cp -n test/test.cfg.example test/test.cfg
Expand Down
9 changes: 4 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
FROM kbase/sdkbase2:latest AS build
FROM kbase/sdkbase2:python AS build


COPY . /tmp/catalog
RUN cd /tmp/catalog && make deploy-service deploy-server-control-scripts

FROM kbase/kb_python:latest
FROM kbase/sdkbase2:python
# These ARGs values are passed in via the docker build command
ARG BUILD_DATE
ARG VCS_REF
Expand All @@ -17,10 +17,9 @@ COPY --from=build /kb/deployment/services /kb/deployment/services
COPY --from=build /tmp/catalog/deployment/conf /kb/deployment/conf

SHELL ["/bin/bash", "-c"]
COPY requirements.txt requirements.txt
RUN source activate root && \
conda install -c anaconda semantic_version pymongo=2.8 && \
pip install docker && \
ln -s /usr/lib/python2.7/plat-*/_sysconfigdata_nd.py /usr/lib/python2.7/
pip install -r requirements.txt

LABEL org.label-schema.build-date=$BUILD_DATE \
org.label-schema.vcs-url="https://github.com/kbase/catalog.git" \
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ LIB_DIR = lib

PATH := kb_sdk/bin:$(PATH)

default: init compile-kb-module
default: init

init:
git submodule init
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# KBase Catalog

KBase core service to manage app and module information, registration, and release.
Administrators need to be set separately for the job stats page by being added to [deploy.cfg.](https://github.com/kbaseapps/kb_Metrics/blob/master/deploy.cfg)

Build status:
master: [![Build Status](https://travis-ci.org/kbase/catalog.svg?branch=master)](https://travis-ci.org/kbase/catalog)
Expand All @@ -10,7 +11,9 @@ develop: [![Build Status](https://travis-ci.org/kbase/catalog.svg?branch=develop
Code coverage: (develop branch)
[![Coverage Status](https://coveralls.io/repos/github/kbase/catalog/badge.svg?branch=develop)](https://coveralls.io/github/kbase/catalog?branch=develop)


#### v2.2.0 - 1/23/19
- Update code to run on Python 3

#### v2.1.3 - 11/16/18
- Update docker-py client code to current 3.x API
- Get Travis-CI tests working again
Expand Down
7 changes: 5 additions & 2 deletions catalog.spec
Original file line number Diff line number Diff line change
Expand Up @@ -781,8 +781,11 @@ module Catalog {
funcdef list_volume_mounts(VolumeMountFilter filter)
returns (list<VolumeMountConfig> volume_mount_configs) authentication required;
/* returns true (1) if the user is an admin, false (0) otherwise */
funcdef is_admin(string username) returns (boolean);
/* returns true (1) if the user is an admin, false (0) otherwise.
NOTE: username is now ignored (it checks the token) but retained for back compatibility
*/
funcdef is_admin(string username) returns (boolean) authentication optional;
/*
version - optional version (commit hash, tag or semantic one) of module, if not set
Expand Down
5 changes: 1 addition & 4 deletions deploy.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,14 @@ mongodb-database = catalog

# The KBase auth server url.
auth-service-url = https://kbase.us/services/authorization/Sessions/Login
admin-roles = KBASE_ADMIN,CATALOG_ADMIN

# Path to docker socket/host
docker-base-url = unix://var/run/docker.sock
# for tcp: "tcp://host:port"
# Docker registry to use
docker-registry-host = dockerhub-ci.kbase.us

# Users (kbase account username) that can review/approve/disable modules and releases.
# Multiple admin users can be specified as a comma delimited list
admin-users =

# Temporary working directory for checking out repos and doing stuff
temp-dir =

Expand Down
8 changes: 5 additions & 3 deletions deployment/conf/.templates/deploy.cfg.templ
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,18 @@ mongodb-pwd = {{ default .Env.mongodb_pwd "" }}

# The KBase auth server url.
auth-service-url = {{ default .Env.auth_service_url "https://kbase.us/services/authorization/Sessions/Login" }}
# The KBase auth API.
auth-service-api = {{ default .Env.kbase_endpoint "https://ci.kbase.us/services" }}/auth

# Path to docker socket/host
docker-base-url = {{ default .Env.docker_base_url "unix://var/run/docker.sock" }}
# for tcp: "tcp://host:port"
# Docker registry to use
docker-registry-host = {{ default .Env.docker_registry_host "dockerhub-ci.kbase.us" }}

# Users (kbase account username) that can review/approve/disable modules and releases.
# Multiple admin users can be specified as a comma delimited list
admin-users = {{ default .Env.admin_users "kkeller,scanon,sychan,dolson" }}
# Roles that can review/approve/disable modules and releases.
# Multiple admin roles can be specified as a comma delimited list
admin-roles = {{ default .Env.admin_roles "KBASE_ADMIN,CATALOG_ADMIN" }}

# Temporary working directory for checking out repos and doing stuff
temp-dir = {{ default .Env.temp_dir "" }}
Expand Down
50 changes: 50 additions & 0 deletions deployment/conf/.templates/deploy.minikb.cfg.templ
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
[catalog]

# host where mongo lives, e.g. localhost:27017
mongodb-host = {{ default .Env.mongodb_host "localhost:27017" }}

# name of the workspace mongo database
mongodb-database = {{ default .Env.mongodb_database "catalog" }}

# the user name for an account with readWrite access to the database
mongodb-user = {{ default .Env.mongodb_user "" }}

# password for the account
mongodb-pwd = {{ default .Env.mongodb_pwd "" }}

# The KBase auth server url.
auth-service-url = {{ default .Env.auth_service_url "https://kbase.us/services/authorization/Sessions/Login" }}
# The KBase auth API.
auth-service-api = {{ default .Env.auth_service_url2 "https://ci.kbase.us/services" }}

# Path to docker socket/host
docker-base-url = {{ default .Env.docker_base_url "unix://var/run/docker.sock" }}
# for tcp: "tcp://host:port"
# Docker registry to use
docker-registry-host = {{ default .Env.docker_registry_host "dockerhub-ci.kbase.us" }}

# Roles that can review/approve/disable modules and releases.
# Multiple admin roles can be specified as a comma delimited list
admin-roles = {{ default .Env.admin_roles "KBASE_ADMIN,CATALOG_ADMIN" }}

# Temporary working directory for checking out repos and doing stuff
temp-dir = {{ default .Env.temp_dir "" }}

# Configuration for server (uwsgi) variables
service-port = {{ default .Env.service_port "5000" }}
http-timeout = {{ default .Env.http_timeout "600" }}
processes = {{ default .Env.processes "20" }}
threads = {{ default .Env.threads "4" }}
cheaper = {{ default .Env.cheaper "4" }}

# Narrative Method Store configuration. Provide either a token or a uid/pwd.
# If both are provided, the token is used.
nms-url = {{ default .Env.nms_url "https://ci.kbase.us/services/narrative_method_store/rpc" }}
nms-admin-token ={{ default .Env.nms_admin_token "" }}

# File system path to mounted network drive used for reference data
ref-data-base = {{ default .Env.ref_data_base "/kb/data" }}

# KBase services end-point used for configuration generation in ref-data initialization
kbase-endpoint = {{ default .Env.kbase_endpoint "https://ci.kbase.us/services" }}

5 changes: 3 additions & 2 deletions lib/Bio/KBase/Catalog/Client.pm
Original file line number Diff line number Diff line change
Expand Up @@ -4686,7 +4686,8 @@ boolean is an int
=item Description
returns true (1) if the user is an admin, false (0) otherwise
returns true (1) if the user is an admin, false (0) otherwise.
NOTE: username is now ignored (it checks the token) but retained for back compatibility
=back
Expand All @@ -4696,7 +4697,7 @@ returns true (1) if the user is an admin, false (0) otherwise
{
my($self, @args) = @_;

# Authentication: none
# Authentication: optional

if ((my $n = @args) != 1)
{
Expand Down
Loading

0 comments on commit 9f63c8d

Please sign in to comment.