-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #214 from hmrc/feature/ITSASU-955
[ITSASU-955] Update README, add start script
- Loading branch information
Showing
2 changed files
with
51 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,62 +1,49 @@ | ||
Income Tax Subscription MicroService | ||
==================================== | ||
[](http://www.apache.org/licenses/LICENSE-2.0.html) | ||
[](https://travis-ci.org/hmrc/income-tax-subscription) [  ](https://bintray.com/hmrc/releases/income-tax-subscription/_latestVersion) | ||
|
||
This is the protected backend MicroService for the Sign Up to Report your Income and Expenses Quarterly (MTD ITSA) service. | ||
# Income Tax Subscription MicroService | ||
|
||
This service provides the backend interactions with other backend MicroServices | ||
This is a scala/Play protected backend MicroService for the Sign Up to Report your Income and Expenses Quarterly (MTD ITSA) service. | ||
|
||
### Running the subscription services locally | ||
This service provides the backend interactions with other backend MicroServices. | ||
|
||
You will need [sbt](http://www.scala-sbt.org/) | ||
Local development requires: | ||
|
||
1) **[Install Service-Manager](https://github.com/hmrc/service-manager/wiki/Install#install-service-manager)** | ||
* [sbt](http://www.scala-sbt.org/) | ||
* MongoDB available on port 27017 | ||
* HMRC Service manager (if using the provided scripts) | ||
* [Install Service-Manager](https://github.com/hmrc/service-manager/wiki/Install#install-service-manager)** | ||
* The services in the ITSA_SUBSC_ALL profile (a subset can be used) | ||
|
||
# How to start this service (main section) | ||
|
||
2) **Start the ITSA subscription dependencies:** | ||
See `scripts/start` | ||
|
||
`sm --start ITSA_SUBSC_DEP -f` | ||
The active port is 9560 | ||
|
||
# How to use | ||
|
||
3) **Clone the frontend service:** | ||
The entry page for this service running locally is | ||
|
||
- SSH | ||
|
||
`git clone [email protected]:hmrc/income-tax-subscription-frontend.git` | ||
|
||
- HTTPS | ||
|
||
`git clone https://github.com/hmrc/income-tax-subscription-frontend.git` | ||
|
||
|
||
4) **Start the frontend service:** | ||
http://localhost:9561/report-quarterly/income-and-expenses/sign-up | ||
|
||
`sbt "run 9561" -Dapplication.router=testOnlyDoNotUseInAppConf.Routes` | ||
|
||
|
||
5) **Clone the protected service:** | ||
The entry page for this service on staging (requires HMRC VPN) is | ||
|
||
- SSH | ||
|
||
`git clone [email protected]:hmrc/income-tax-subscription.git` | ||
|
||
- HTTPS | ||
|
||
`git clone https://github.com/hmrc/income-tax-subscription.git` | ||
|
||
|
||
6) **Start the protected service:** | ||
https://www.staging.tax.service.gov.uk/report-quarterly/income-and-expenses/sign-up | ||
|
||
# How to test | ||
|
||
`sbt "run 9560" -Dapplication.router=testOnlyDoNotUseInAppConf.Routes` | ||
There are two built in test sets: `test` and `it:test`. See build.sbt for details. | ||
|
||
7) **Start the stubbed services:** | ||
# Persistence | ||
|
||
`sm --start INCOME_TAX_SUBSCRIPTION_STUBS -f` | ||
Data is stored as key/value in Mongo DB. See json reads/writes implementations (especially tests) for details. | ||
|
||
8) **Go to the homepage:** | ||
To connect to the mongo db provided by docker (recommended) please use | ||
|
||
http://localhost:9561/report-quarterly/income-and-expenses/sign-up | ||
``` | ||
docker exec -it mongo-db mongosh | ||
``` | ||
|
||
### License | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/bin/bash | ||
|
||
cd $(dirname $0)/.. | ||
|
||
function die() { | ||
echo "$1" | ||
exit 1 | ||
} | ||
|
||
MONGO_PORT=27017 | ||
which nc &>/dev/null && nc -vz localhost $MONGO_PORT 2>/dev/null || die "Can't find MongoDB on port $MONGO_PORT (using: nc -vz localhost $MONGO_PORT)" | ||
|
||
which sm &>/dev/null || die "Can't find Service Manager" | ||
|
||
sm --start ITSA_SUBSC_DEP | ||
sm --start AGENTS_TAX_ENROLMENTS | ||
sm --start INCOME_TAX_SUBSCRIPTION_SELF_EMPLOYED_FRONTEND | ||
sm --start INCOME_TAX_SUBSCRIPTION_STUBS | ||
sm --start INCOME_TAX_SUBSCRIPTION_ELIGIBILITY | ||
sm --start INCOME_TAX_SUBSCRIPTION_ELIGIBILITY_FRONTEND | ||
sm --start INCOME_TAX_SUBSCRIPTION_FRONTEND | ||
sm --start TAX_ENROLMENTS | ||
|
||
sleep 5 | ||
sbt "run 9560 -Dapplication.router=testOnlyDoNotUseInAppConf.Routes" |