This repository has been archived by the owner on Jul 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
2 additions
and
113 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,97 +1,3 @@ | ||
# Parsley 🌿 | ||
# 🚨 Parsley has moved! | ||
|
||
Parsley is the UI for Evergreen's log viewer. It is the replacement for | ||
[Lobster](https://github.com/evergreen-ci/lobster). | ||
|
||
## Table of Contents | ||
|
||
- [Getting Started](#getting-started) | ||
|
||
## Getting Started | ||
|
||
### Running Locally | ||
|
||
1. Clone this GitHub repository. | ||
2. Ensure you have Node.js 16.13+ and | ||
[Yarn](https://yarnpkg.com/getting-started/install) installed. | ||
3. Run `yarn`. | ||
4. Run `yarn run dev`. This will launch the app. | ||
|
||
### Starting supporting services | ||
|
||
Parsley is capable of fetching logs from both | ||
[evergreen](https://github.com/evergreen-ci/evergreen) and | ||
[logkeeper](https://github.com/evergreen-ci/logkeeper). If you would like to | ||
develop against them you will need to run both of the servers locally. | ||
|
||
**Evergreen** | ||
|
||
1. Clone the [Evergreen Repository](https://github.com/evergreen-ci/evergreen) | ||
2. Follow the setup instructions in the README to set up your environment. | ||
3. Run `make local-evergreen` to start the local evergreen server | ||
|
||
**Logkeeper** | ||
|
||
1. Clone the [Logkeeper Repository](https://github.com/evergreen-ci/logkeeper) | ||
2. Run `yarn bootstrap-logkeeper` to download some sample resmoke logs from s3. | ||
3. Run the command outputted by the previous step to seed the env variables and | ||
start the local logkeeper server | ||
|
||
```bash | ||
LK_CORS_ORIGINS=http:\/\/localhost:\\d+ LK_EVERGREEN_ORIGIN=http://localhost:8080 LK_PARSLEY_ORIGIN=http://localhost:5173 go run main/logkeeper.go --localPath {abs_path_to_parsley}/bin/_bucketdata | ||
``` | ||
|
||
Note that all log output is piped to a file named `logkeeperapp.log`. You can | ||
use `tail -f logkeeperapp.log` to view the log output. | ||
|
||
### GraphQL Type Generation | ||
|
||
To be able to use code generation, you'll need to create a symlink to the | ||
`schema` folder in Evergreen. This folder contains the definitions for our | ||
GraphQL queries, mutations, and types. | ||
To create a symlink, run the following command: | ||
``` | ||
ln -s <path_to_evergreen_repo>/graphql/schema sdlschema | ||
``` | ||
### Environment Variables | ||
[env-cmd](https://github.com/toddbluhm/env-cmd#readme) is used to configure | ||
build environments for production, staging and development. We use two files to | ||
represent these various environments: `.cmdrc-local.json` for local builds with | ||
non-sensitive information, and `.env-cmdrc.json` for builds deployed to S3. This | ||
file is git ignored because it contains API keys that we do not want to publish. | ||
It should be named `.env-cmdrc.json` and placed at the root of the project. This | ||
file is required to deploy Parsley to production and to staging. The credential | ||
file is located in the R&D Dev Prod 1password vault. | ||
### Common errors | ||
- Sometimes you may run into an error where a dependency is out of date or in a | ||
broken state. If you run into this issue try running `yarn install` to | ||
reinstall all dependencies. If that does not work try deleting your | ||
`node_modules` folder and running `yarn install` again. You can use the | ||
`yarn clean` command to do this for you. | ||
## Deployment | ||
### Requirements | ||
You must be on the `main` Branch if deploying to prod. | ||
A `.env-cmdrc.json` file is required to deploy because it sets the environment | ||
variables that the application needs for a given deployment environments. See | ||
[Environment Variables](#environment-variables) section for more info about this | ||
file. | ||
### How to Deploy: | ||
Run the `deploy:<env>` yarn command | ||
- `yarn deploy:prod` = deploy to https://parsley.mongodb.com | ||
- Deploying to production involves following the prompts in the cli command | ||
which kicks off an evergreen task that performs the deploy | ||
- `yarn deploy:beta` = deploy to https://parsley-beta.corp.mongodb.com | ||
- `yarn deploy:staging` = deploy to https://parsley-staging.corp.mongodb.com | ||
You can now find it at [evergreen-ci/ui](https://github.com/evergreen-ci/ui/tree/main/apps/parsley). |