Skip to content
Snippets Groups Projects
Commit fc442f36 authored by Daniel Lyons's avatar Daniel Lyons
Browse files

Merge remote-tracking branch 'gitlab/main' into main

parents b9b74d01 57304abb
No related branches found
No related tags found
No related merge requests found
Pipeline #238 waiting for manual action
...@@ -12,6 +12,7 @@ image: docker:19.03.12 ...@@ -12,6 +12,7 @@ image: docker:19.03.12
before_script: before_script:
- echo "$CI_MERGE_REQUEST_TARGET_BRANCH_NAME" - echo "$CI_MERGE_REQUEST_TARGET_BRANCH_NAME"
- echo "$CI_COMMIT_REF_NAME" - echo "$CI_COMMIT_REF_NAME"
- echo "$CI_COMMIT_REF_NAME"
# Check if branch is associated with a MR # Check if branch is associated with a MR
# This helps solves the issue of duplicate pipelines when a branch that's associated with a PR is changed # This helps solves the issue of duplicate pipelines when a branch that's associated with a PR is changed
......
...@@ -21,3 +21,6 @@ This system has several subsystems which have their own subsystems. The two prim ...@@ -21,3 +21,6 @@ This system has several subsystems which have their own subsystems. The two prim
The pieces are broken down into applications (both web-based and command-line), RESTful services and shared libraries. The pieces are broken down into applications (both web-based and command-line), RESTful services and shared libraries.
More details can be had by looking at our Confluence documentation. More details can be had by looking at our Confluence documentation.
## Development Guide
[Development](development.md)
FROM node:14.15.1-alpine3.12
# RUN apk add --no-cache git python3 && alias python=python3
# --virtual build-dependencies
WORKDIR /app
COPY package-lock.json .
COPY package.json .
RUN apk update && apk add --virtual build-dependencies \
git \
python2 \
g++ \
make \
&& rm -rf /var/cache/apk/* \
&& npm install --production=false \
&& apk del build-dependencies
# COPY . .
CMD [ "npm", "start" ]
\ No newline at end of file
FROM node:14.15.1-alpine3.12
WORKDIR /code/
ENTRYPOINT ["./bin/boot-local.sh"]
\ No newline at end of file
#! /bin/sh
# FOR USE WITH DOCKER LOCAL ENVIRONMENT ONLY.
# install system dependencies
apk add --no-cache \
git \
python2 \
g++ \
make
# NPM install
# npm install --production=false
npm install
alias ng='/code/node_modules/@angular/cli/bin/ng'
# Start development server
ng serve --host 0.0.0.0
# Development Guide
## Overview
Workspaces' services run on Docker containers. These containers can be all started at once using Docker Compose.
### Setup
Build the base image:
```sh
make docker-base
```
In the Makefile, this Docker command is run:
```sh
docker build -t marconi.aoc.nrao.edu/ops/base:workspaces -f Condaless.dockerfile.v2 .
```
This builds a local Docker image tagged as `marconi.aoc.nrao.edu/ops/base:workspaces` on your machine
using the `Condaless.dockerfile.v2` Dockerfile.
Once the image has been built, Docker will save this image on your machine. You do not need to run the `make docker-base`
command again unless you delete this image or modify the `Condaless.dockerfile.v2` Dockerfile.
### Starting Workspaces
To start Workspaces as foreground process, run:
```sh
docker-compose -f docker-compose.local.yml up
```
To start Workspaces as background process, run:
```sh
docker-compose -f docker-compose.local.yml up -d
```
### Stopping Workspaces
To stop Workspaces, run:
```sh
docker-compose -f docker-compose.local.yml down
```
### Starting Individual Services
To start Workspaces as foreground process, run:
```sh
docker-compose -f docker-compose.local.yml up <service_name>
```
### List Containers
To get a list of running containers:
```sh
docker container ls
```
Or:
```sh
docker ps
```
### Show Container Logs
To output logs of a specific container:
```sh
docker logs <container_name>
```
To continuously tail logs of a specific container:
```sh
docker logs -f <container_name>
```
### Open a Shell on a Running Container
Using Docker:
```sh
docker exec -it <container_name> bash
```
Using Docker Compose:
```sh
docker-compose exec <service_name> bash
```
### Run a command on a Running Container
Using Docker:
```sh
docker exec <container_name> pwd
```
Using Docker Compose:
```sh
docker-compose exec <service_name> pwd
```
...@@ -24,6 +24,7 @@ services: ...@@ -24,6 +24,7 @@ services:
parallelism: 0 parallelism: 0
order: stop-first order: stop-first
capability: capability:
image: marconi.aoc.nrao.edu/workspaces/capability:${TAG_TO_DEPLOY} image: marconi.aoc.nrao.edu/workspaces/capability:${TAG_TO_DEPLOY}
ports: ports:
......
...@@ -357,7 +357,7 @@ class Workflow(Base, WorkflowIF): ...@@ -357,7 +357,7 @@ class Workflow(Base, WorkflowIF):
requests = relationship("WorkflowRequest", backref="workflows") requests = relationship("WorkflowRequest", backref="workflows")
def __json__(self, request): def __json__(self, request):
return {"workflow_name": self.workflow_name, "templates": self.templates, "hey":"world"} return {"workflow_name": self.workflow_name, "templates": self.templates}
def __repr__(self): def __repr__(self):
return f"<Workflow workflow_name={self.workflow_name}>" return f"<Workflow workflow_name={self.workflow_name}>"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment