Skip to content

Commit

Permalink
added missing steps in setup doc
Browse files Browse the repository at this point in the history
  • Loading branch information
mahendraintelops committed Mar 13, 2023
1 parent fd157d8 commit 4b120ed
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 11 deletions.
15 changes: 8 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,21 @@ This project is written in Golang, NodeJs(TypeScript) and ReactJs(TypeScript). T
#### KinD
- Install KinD from https://kind.sigs.k8s.io/docs/user/quick-start/#installing-from-release-binaries
- Create KinD cluster https://kind.sigs.k8s.io/docs/user/quick-start/#creating-a-cluster
- Check if you can access the cluster created in previous step and you are able to list dow n the pods.
- Check if you can access the cluster created in previous step, and you are able to list down the pods.
#### minikube
- Install create minikube cluster from https://minikube.sigs.k8s.io/docs/start/
- Check if you can access the cluster created in previous step and you are able to list dow n the pods.
- Install and create minikube cluster from https://minikube.sigs.k8s.io/docs/start/
- Check if you can access the cluster created in previous step, and you are able to list down the pods.
5. Fork the project.
6. Clone the project: `git clone https://github.com/[YOUR_USERNAME]/compage && cd compage`
7. kindly refer compage.md file to know the structure of the project.
8. The Compage has 3 servers (subprojects) which need to be started to run the compage on local
8. Refer [GitHub App setup](./github-app-setup.md)
9. The Compage has 3 servers (subprojects) which need to be started to run the compage on local
- core (Golang), navigate to core directory and follow its [core README](./core/README.md)
- app (Nodejs), navigate to app directory and follow its [app README](./app/README.md)
- ui (ReactJs), navigate to ui directory and follow its [ui README](./ui/README.md)
9. Commit changes *([Please refer the commit message conventions](https://www.conventionalcommits.org/en/v1.0.0/))*
10. Push commits
11. Open pull request
10. Commit changes *([Please refer the commit message conventions](https://www.conventionalcommits.org/en/v1.0.0/))*
11. Push commits
12. Open pull request
## Improving the Documentation
The documentation is contained within `./docs` and made with Docusaurus. See the [Docs README](./docs/README.md) for infos about developing the docs.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<p style="text-align:center"><b>Low-Code No-Code for Cloud Native</b></p>

<p style="text-align:center">
<a href="code_of_conduct.md">
<a href="code-of-conduct.md">
<img src="https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg" alt="Contributor Covenant">
</a>
<a href="https://opensource.org/licenses/Apache-2.0">
Expand Down Expand Up @@ -104,4 +104,8 @@ Solution: **Compage**
- User will be shown with a dialog box, where user has to select from existing projects or create a new project.
- A compage project has a one-to-one relationship with GitHub repository. The compage project's connected GitHub repository can contain all the generated source code for all the nodes created on drawing panel. Compage follows monorepo method, all connected microservices in single git repository.
- User then can use drawing panel to create nodes and configure them using forms. At last, user has to save the project and hit `Generate Code` button. The code will be generated and saved to GitHub repository.
- User can later use same panel to add more microservices(nodes) or modify existing microservices. When the code is generated, version is locked till that point and any change made post code-generation till next code-generation is locked next version. User's can have at most 10 versions per project. Moving between versions is not yet supported.
- User can later use same panel to add more microservices(nodes) or modify existing microservices. When the code is generated, version is locked till that point and any change made post code-generation till next code-generation is locked next version. User's can have at most 10 versions per project. Moving between versions is not yet supported.

## Getting started with compage
- Register an app - Refer [GitHub App setup](./github-app-setup.md).
- Follow step-by-step instructions given here [Run Compage on local](./deploy/README.md).
2 changes: 1 addition & 1 deletion charts/compage/values.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Define serviceAccount names for components. Defaults to component's fully qualified name.
# GitHub app configuration.
githubApp:
# update below value cluster's node ip and with port specified here (.Values.ui.service.nodePort)
redirectURI: "http://www.compage.dev:32222/login"
Expand Down
File renamed without changes.
4 changes: 3 additions & 1 deletion deploy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
git clone https://github.com/intelops/compage.git
```

2. Navigate to deploy directory and run below script to create docker images of core, app and ui components. You may want to change the tag there. The same tag you will later need to update in values.yaml of compage's helm chart along with imagePullPolicy set to Never.
2. Navigate to deploy directory and run below script to create docker images of core, app and ui components. You may want to change the tag there. The same tag you will later need to update in values.yaml for helm chart of compage along with imagePullPolicy set to Never. You may need to change the `GitHub app configuration` in values.yaml too.
```shell
./build-docker-images.sh
```
Expand All @@ -30,6 +30,7 @@
```shell
KIND_NODE_IP=$(kubectl get nodes -o wide --no-headers | awk -v OFS='\t' '{print $6}')
```

5. Update minikube ip in `/etc/hosts`.
```shell
$MINIKUBE_IP (retrieved by 'minikube ip' command) www.compage.dev
Expand All @@ -38,6 +39,7 @@
```shell
$KIND_NODE_IP (retrieved by above command) www.compage.dev
```

6. Fire below command in root directory.
```shell
helm install compage charts/compage --values charts/compage/values.yaml
Expand Down
18 changes: 18 additions & 0 deletions github-app-setup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
- Register a new app on GitHub to retrieve clientId and clientSecret by following steps given on this link - https://docs.github.com/en/apps/creating-github-apps/creating-github-apps/creating-a-github-app. Update the clientId and clientSecret in ui/.env.development [For dev-environment]
```shell
# production config
# github config
REACT_APP_GITHUB_APP_CLIENT_ID=XXXXXX
REACT_APP_GITHUB_APP_REDIRECT_URI=http://www.compage.dev:32222/login
# compage-app config
REACT_APP_COMPAGE_APP_SERVER_URL=http://www.compage.dev:31111
```
and add below keys in ~/.compage/.env
```shell
# github config
GITHUB_APP_CLIENT_ID=XXXXXXXX
GITHUB_APP_CLIENT_SECRET=XXXXXXXX
GITHUB_APP_REDIRECT_URI=http://localhost:3001/login
# compage-core config
COMPAGE_CORE_URL=localhost:50051
```
File renamed without changes.

0 comments on commit 4b120ed

Please sign in to comment.