Help
Links
Frequently Asked Questions
Why is my config.yml dependency missing?
Did you run yarn setup url#branch?
Your config.yml may only be updated on branches other than default.
How do I switch between Catena projects?
Your catena projects should be developed in isolated er2_web clones.
To switch the project that the `catena` command will interact with, you'll need to unlink the previous one:
$ catena unlink
Then navigate to your er2_web clone and run the usual:
$ yarn link
Cloning a Catena Project
Call with Yaege,Lucas-20220309_105157-Meeting Recording.mp4
Assume you have cloned kube-scripts repo: You must login to see this link. Register now, if you have no user account yet.
Assume your project is in Mercurial (Project Manager should have created a project)
- Make sure start.sh is executable (40:35 - 49:01)
- In the project repo
- Go to deploy/publish/Dockerfile
- After "ADD start.sh /", add a line "RUN +x /start.sh" if it doesn't exist
- Run through the catena pipeline
- Explanation for making build instructions (00:10 - 08:40)
- Make sure you have a linux subsystem (for windows) and all dependencies (09:20 - 20:22)
- cd /mnt
- apt update
- sudo apt upgrade (cuz why not have the latest and greatest XD)
- ssh eramscloud@derams9
- kubctl get services -n erams
- -n for namespace
- Shows mappings from projects to ports
- Pick port number from 50000 - 53000
- kubctl get services -n erams | grep {chosen port number}
- Port you chose is good if it return anything
- replicate the folder that you want to clone from and change stuff (build instructions for one project) (20:22 - 26:40)
- Copy and paste folder and rename the project to what you want it to be called
- Go to the builders.py and change what needs to be changed
- class {old app}Builder -> class {new app}Builder
- {old app}-{whatever} -> {new app}-{whatever} (i.e. wrap-web -> sims-web)
- In general {old app} -> {new app}
- Change port number to what you chose
- Image name has to match name on docker hub (CatenaPipeline) (24:53 - 25:38)
- Add project to run.py (26:40 - 29:60)
- Import {new app}Builder
- Add project to the giant if statement
- Add Project to Jenkins (29:10 - 30:45)
- Find project you're copying from
- Copy project name without "Project" (i.e. "50315_erams_wrap)
- Go back to dashboard (jenkins > eRAMS)
- Click "New Item"
- Paste project name changing port number and project name
- Paste project name in the "Copy from" field
- Click OK
- Ctrl+f {old app} name
- In Execute shell {old app} -> {new app}
- Param should match the if statement
- Ask Lucas (or use your best judgement) for any others
- Click save
- Push changes to Kube-Scripts (31:05 - 32:00)
- Pull kube scripts in derams (32:00 - 32:57)
- Go to your linux subsystem (Assume you are still connected to derams9)
- cd /kube-scripts/
- hg pull
- hg up
- Build Project (32:57 - 35:05)
- Go to your new project in jenkins
- Click "Build with Parameters"
- Set conf_depl_cmd to create
- In config type "img-tag={whatever the image tag is in mercurial}"
- Click build
- Connect project to outside world (36:46)
- In linux subsystem
- exit
- Close connection to derams9
- ssh perams0
- cd /etc/haproxy/conf.d
- sudo vim 02-80.cfg (good luck with vim)
- In the correct alphabetical order (for risk of disappointing Lucas)
- add "acl host_erams_{new_app} -i {url to website}" to the right section
- add "use backend erams_{new_app} if host_erams_{new_app}" to the right section
- :wq (to save)
- sudo vim 05-erams.cfg
- Yank (I forget how) a backend clock of code
- Paste (I forget how)
- Change backend to reference "erams_{new_app}"
- Change port number to reference chosen port number
- :wq (to save)
- sudo /home/eramscloud/kube-scripts/haproxy/haconfig.sh
Hopefully That works