rediOps/docs/developers_server_start.md

186 lines
5.0 KiB
Markdown
Raw Normal View History

2023-07-23 11:45:31 +00:00
# Back end server developer flow (start)
This is the initialisation of the back end
code. Coding the client is covered in document
[developers client start](developers_client_start.md)
The [analysis start](analysis_start.md) is a pre-requisite for
this flow.
The assumptions for this documents are:
* the Git repository has been created
* a new API is required to be exposed
* an OpenAPI definition exists in Git
* no API coding has commenced
* Visual Studio Code has been installed
* Developer has access to the API editor viewer for the OpenAPI specification
## Sequence Diagram
### Automation
2023-07-23 11:57:08 +00:00
The sequence of automation activity using **devops** file and **qaskx-cli** is
2023-07-23 11:45:31 +00:00
as follows.
The Qaskx command line tool needs to be installed on the developer machine
```mermaid
sequenceDiagram
actor dev as Developer
participant vsc as Visual Studio Code
participant term as Terminal
participant qaskx as qaskx-cli
participant cmdb as CMDB
participant git as Github
2023-07-23 11:57:08 +00:00
link git: GitHub @ https://github.com/meerkat-manor/devops
2023-07-23 11:45:31 +00:00
participant oas3f as OpenAPI file
2023-07-23 11:57:08 +00:00
participant devops as devops file
2023-07-23 11:45:31 +00:00
participant apip as API portal
dev ->>+ vsc: start IDE
Note over vsc, term: Clone existing git for project
vsc ->>+ git :
git -->>- vsc : Cloned, project opened
2023-07-23 11:57:08 +00:00
Note over git, devops: The OpenAPI and devops files are stored in Git
2023-07-23 11:45:31 +00:00
vsc ->>+ term: start
term ->>+ qaskx: New CI
2023-07-23 11:57:08 +00:00
qaskx ->>+ devops: Read
devops -->>- qaskx: Contents
2023-07-23 11:45:31 +00:00
qaskx ->>+ oas3f: Read
oas3f -->>- qaskx: Contents
2023-07-23 11:57:08 +00:00
Note over cmdb, git: qaskx devops ci cmd
2023-07-23 11:45:31 +00:00
qaskx ->>+ cmdb:
cmdb -->>- qaskx: New CI value
2023-07-23 11:57:08 +00:00
qaskx -) devops: Update CI entry
2023-07-23 11:45:31 +00:00
qaskx -->>- term: Success
term ->>+ qaskx: Generate code
Note over qaskx, cmdb: qaskx gen server cmd
2023-07-23 11:57:08 +00:00
qaskx ->>+ devops: Read
devops -->>- qaskx: Contents
2023-07-23 11:45:31 +00:00
qaskx ->>+ oas3f: Read
oas3f -->>- qaskx: Contents
qaskx -) qaskx: Auto generate server code
qaskx -) qaskx: Auto generate sequence diagram
qaskx -) qaskx: Auto generate gateway infra
qaskx -) qaskx: Auto generate feature flags
2023-07-23 11:57:08 +00:00
qaskx -) devops: Auto update entries, including build, test
2023-07-23 11:45:31 +00:00
qaskx -->>- term: Success
2023-07-23 11:57:08 +00:00
alt Register API if not already done
2023-07-23 11:45:31 +00:00
term ->>+ qaskx: Register API
2023-07-23 11:57:08 +00:00
Note over cmdb, git: qaskx devops register cmd
qaskx ->>+ devops: Read
devops -->>- qaskx: Contents
2023-07-23 11:45:31 +00:00
qaskx ->>+ oas3f: Read
oas3f -->>- qaskx: Contents
qaskx ->>+ apip:
apip -->>- qaskx: Registered
2023-07-23 11:57:08 +00:00
qaskx -) devops: Auto update API entry
2023-07-23 11:45:31 +00:00
qaskx -->>- term: Success
end
term -->- vsc: close
vsc ->>+ git: Commit
git --) git: Trigger GitActions for lint, gateway, features, etc
git ->>- vsc: Success
vsc -->>- dev: close
```
### Manual
The equivalent sequence of manual activity, non qaskx actions is as follows.
2023-07-23 11:57:08 +00:00
The **devops** file is still used. Without **devops** file you will
2023-07-23 11:45:31 +00:00
follow whatever your existing process is and recorded the necessary
details in various documents
The OpenAPI tool needs to be installed on the developer machine.
```mermaid
sequenceDiagram
actor dev as Developer
participant vsc as Visual Studio Code
participant cmdb as CMDB
link vsc: Visual Studio @ https://code.visualstudio.com/
participant term as Terminal
participant git as Github
2023-07-23 11:57:08 +00:00
link git: GitHub @ https://github.com/meerkat-manor/devops
2023-07-23 11:45:31 +00:00
participant oas3f as OpenAPI file
2023-07-23 11:57:08 +00:00
participant devops as devops file
2023-07-23 11:45:31 +00:00
participant oas3 as OpenAPI tool
participant apip as API portal
Note over cmdb, vsc: Create new CI entry for API
dev ->>+ cmdb: Access UI
cmdb -->> cmdb: Create CI entry
cmdb -->>- dev: Close, noting CI value
2023-07-23 11:57:08 +00:00
Note over git, devops: The OpenAPI and devops files are stored in Git
2023-07-23 11:45:31 +00:00
dev ->>+ vsc: start IDE
Note over cmdb, vsc: Clone existing git for project
vsc ->>+ git :
git -->>- vsc : Cloned, project opened
2023-07-23 11:57:08 +00:00
vsc -) devops: Update CI entry
2023-07-23 11:45:31 +00:00
vsc ->>+ term: start
Note over git, oas3: Set generation parameters
term ->>+ oas3: Generate code cmd
oas3 ->>+ oas3f: Read
oas3f -->>- oas3: Contents
oas3 -->>- term: Success
term -->- vsc: close
vsc -) vsc: Update server code with defaults
vsc -) vsc: Manually write sequence diagrams
vsc -) vsc: Manually write Gateway infra
vsc -) vsc: Manually write feature flags
2023-07-23 11:57:08 +00:00
alt Register API if not already done
2023-07-23 11:45:31 +00:00
dev ->>+ apip: Register API
apip -->>- dev: Registered
end
2023-07-23 11:57:08 +00:00
vsc -) devops: Manually update entries
2023-07-23 11:45:31 +00:00
vsc ->>+ git: Commit
git --) git: Trigger GitActions for lint, gateway, features, etc
git ->>- vsc: Success
vsc -->>- dev: Done
```
# End Status of flow
At the end of this flow the basic code stubs exist and have been committed
to Github. The code can execute and will return not implemented
response results.
# Reading Notes
2023-07-23 11:57:08 +00:00
The Visual Studio Code, CMDB and Github components can be substituted for
2023-07-23 11:45:31 +00:00
other software products such IntelliJ and Bitbucket.