Skip to content
This repository was archived by the owner on Nov 15, 2024. It is now read-only.

Commit 06e61eb

Browse files
committed
Add private CI/CD pipelines to the SDLC
1 parent b7c4a65 commit 06e61eb

26 files changed

+170
-11
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ On the backend (aka. the server-side), CodeStream runs a number of services to
44
provide all the functionality needed for the clients. The default development
55
environment will use the codestream broadcaster and rabbitMQ with outbound mail
66
disabled.
7-
## Development Setup
7+
8+
## Development Setup with the devtools Framework
89

910
_Note: CodeStream employees should use the dev_tools sandbox as it will provide
1011
most of the ancillary resources you'll need, most notably our development
@@ -14,6 +15,7 @@ Details [here](docs/codestream-sandbox-setup.md). Supplemental documentation is
1415

1516
For everyone else, read on...
1617

18+
## Development Setup without the devtools Framework
1719
### Prerequisites
1820

1921
1. Mac or Linux computer using zsh or bash.

api_server/sandbox/configure-sandbox

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ fi
3636
echo "npm install --no-save $CS_API_NPM_INSTALL_XTRA_OPTS (from `pwd`)"
3737
npm install --no-save $CS_API_NPM_INSTALL_XTRA_OPTS
3838

39+
# Add absolute remotes
40+
echo git remote add private [email protected]:teamcodestream/codestream-server-private
41+
git remote add private [email protected]:teamcodestream/codestream-server-private
42+
3943
# package integrity check
4044
# if [ -f sandbox/package-versions.txt ]; then
4145
# tmpfile=/tmp/junk$$
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
SB_TYPE=cs_api
2+
SB_PREFIX=CS_API
3+
[email protected]:teamcodestream/codestream-server-private
4+
SB_REPO_ROOT=codestream-server
5+
SB_PROJECT_PATH=codestream-server/api_server
6+
# SB_DEPS=a:b:c

broadcaster/sandbox/configure-sandbox

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,9 @@ fi
6868
# /bin/rm $tmpfile
6969
# fi
7070

71+
# Add absolute remotes
72+
echo git remote add private [email protected]:teamcodestream/codestream-server-private
73+
git remote add private [email protected]:teamcodestream/codestream-server-private
7174

7275
# Add git hooks as needed
7376
cd $CS_BROADCASTER_REPO_ROOT/.git/hooks
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
SB_TYPE=broadcast
2+
SB_PREFIX=CS_BROADCASTER
3+
[email protected]:teamcodestream/codestream-server-private
4+
SB_REPO_ROOT=codestream-server
5+
SB_PROJECT_PATH=codestream-server/broadcaster
6+
# SB_DEPS=a:b:c

docs/codestream-sandbox-setup.md

Lines changed: 40 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ with the codestream-server sandbox in a playground. AWS SQS requires an AWS IAM
2828
access key or the codestream-server sandbox to run on a managed EC2 development
2929
instance.
3030

31-
## Installation on a Managed VM
31+
## Installation
3232

3333
Probably the fastest way to get started would be by launching your own private
3434
development VM and running a setup script that will prepare your entire
@@ -58,7 +58,24 @@ framework.
5858
If you have any custom alterations to the standard configuration, you will
5959
need to be familiar with the procedures in this document.
6060

61-
### Installation
61+
### Quick and Dirty
62+
63+
The framework includes an installation script that does all the work. If you
64+
don't have the framework installed on your notebook, you could spin up a
65+
development instance for yourself. [This is documented
66+
here](https://dtops-docs.codestream.us/netuser/resources/dev-vms/).
67+
68+
This will install all the codestream sandboxes including the front-end client
69+
repo, onprem-install and backend repos.
70+
```
71+
dt-dev-setup --codestream
72+
```
73+
74+
### Installation & Setup Using dev_tools Framework commands
75+
76+
This is _mostly_ what the **dt-dev-setup** script will do, but reduced to the
77+
sandboxes applicable solely to the CodeStream Back-End services.
78+
6279
1. Update your secrets (`dt-update-secrets -y`).
6380
1. Select a codestream configuration to use (details documented
6481
[here](../api_server/docs/unified-cfg-file.md)). To get up and running quickly, this
@@ -67,8 +84,7 @@ framework.
6784
echo codestream-cloud > ~/.codestream/config/codestream-cfg-default.local
6885
```
6986
1. Open a new terminal window, without any sandboxes loaded.
70-
1. If you're using a mongo sandbox, load it into your shell and start the mongo
71-
service.
87+
1. If you're using a mongo sandbox, load it into your shell.
7288
```
7389
dt-load mongo
7490
mdb-service start
@@ -98,3 +114,23 @@ new shells for codestream backend development:
98114
```
99115
dt-load-playground csbe
100116
```
117+
You are good to go.
118+
119+
## Loading the Playground
120+
121+
1. In a new shell, load the backend playground with the command
122+
`dt-load-playground csbe` or `dlp csbe`. This sets your shell up with the
123+
mongo and backend server mono-repo sandboxes. Run `dt-env` to see them.
124+
125+
1. Control mongo with the `mdb-service` command
126+
```
127+
mdb-service { start | stop | status }
128+
```
129+
130+
1. See the backend mono-repo commands with `csbe-help`. Since the mono-repo
131+
effectively loads all the component sandboxes (api, mailout, mailin,
132+
broadcaster, onprem-admin), all of those commands are available as well. Use
133+
`cs_api-help`, `cs_outbound_email-help`, `cs_mailin-help`,
134+
`cs_broadcaster-help` and `opadm-help`.
135+
136+
Happy coding!.

inbound_email/sandbox/configure-sandbox

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ abort_on_fail=1
2525

2626
cd $CS_MAILIN_TOP
2727

28-
2928
# $DT_TOP/bin/create-file-from-template.py -t $XYZ_SANDBOX/git_project/etc/httpd.conf.template -o $XYZ_SANDBOX/conf/httpd.conf
3029

3130
# Wipe the node_modules and re-install
@@ -43,6 +42,10 @@ if [ -n "$CS_MAILIN_NODE_VER" ]; then
4342
fi
4443
fi
4544

45+
# Add absolute remotes
46+
echo git remote add private [email protected]:teamcodestream/codestream-server-private
47+
git remote add private [email protected]:teamcodestream/codestream-server-private
48+
4649
# Add git hooks as needed
4750
echo -n "Installing git hooks as sym links"
4851
cd $CS_MAILIN_REPO_ROOT/.git/hooks

inbound_email/sandbox/nr.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
# use for the New Relic internal environment
3+
[ -z "$CS_MAILIN_ASSET_ENV" ] && export CS_MAILIN_ASSET_ENV=dev
4+
export CSSVC_ENV=nr
5+
export CSSVC_CONFIGURATION=codestream-cloud
6+
. $CS_MAILIN_TOP/sandbox/defaults.sh
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
SB_TYPE=cs_mailin
2+
SB_PREFIX=CS_MAILIN
3+
[email protected]:teamcodestream/codestream-server-private
4+
SB_REPO_ROOT=codestream-server
5+
SB_PROJECT_PATH=codestream-server/inbound_email
6+
# SB_DEPS=a:b:c

onprem_admin/sandbox/configure-sandbox

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ fi
6767
# /bin/rm $tmpfile
6868
# fi
6969

70+
# Add absolute remotes
71+
echo git remote add private [email protected]:teamcodestream/codestream-server-private
72+
git remote add private [email protected]:teamcodestream/codestream-server-private
7073

7174
# Add git hooks as needed
7275
cd $OPADM_REPO_ROOT/.git/hooks

0 commit comments

Comments
 (0)