Skip to content

Commit a75cccb

Browse files
Ramkumar Chinchanirchamarthy
authored andcommitted
docs: add code structure
Signed-off-by: Ramkumar Chinchani <[email protected]>
1 parent 48dcdb4 commit a75cccb

File tree

2 files changed

+156
-0
lines changed

2 files changed

+156
-0
lines changed

docs/developer_guide/CONTRIBUTING.md

Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
# Getting Started
2+
3+
## Fork Repository
4+
5+
[Fork](https://github.com/project-stacker/stacker) the stacker repository on GitHub to your personal account.
6+
7+
```
8+
#Set golang environment
9+
export GOPATH=$HOME/go
10+
mkdir -p $GOPATH/src/github.com/project-stacker
11+
12+
#Get code
13+
go get github.com/project-stacker/stacker
14+
cd $GOPATH/src/github.com/project-stacker/stacker
15+
16+
#Track repository under your personal account
17+
git config push.default nothing # Anything to avoid pushing to project-stacker/stacker by default
18+
git remote rename origin project-stacker
19+
git remote add $USER [email protected]:$USER/stacker.git
20+
git fetch $USER
21+
22+
```
23+
24+
NOTES: Note that GOPATH can be any directory, the example above uses $HOME/go.
25+
Change $USER above to your own GitHub username.
26+
27+
## Build
28+
29+
See [build instructions](./building_stacker.md) in the `stacker` Developer Guide.
30+
31+
## Using host's toolchain
32+
33+
```
34+
make
35+
```
36+
37+
# Project Structure
38+
```
39+
.
40+
...
41+
├── atomfs # Source code contains the main atomfs logic
42+
├── cmd # Source code that handles commandline logic
43+
├── container # Source code for container management
44+
├── embed-exec # Source code for converting a file to a exec cmd
45+
├── lib # Source code contains helper routines
46+
├── log # Source code that handles logging
47+
├── mount # Source code that handles the mount logic
48+
├── mtree # Source code that handles the mtree logic
49+
├── oci # Source code that handles the OCI layout logic
50+
├── overlay # Source code that handles overlayfs logic
51+
├── squashfs # Source code that handles squashfs logic
52+
├── storage # Source code contains common storage code
53+
├── test # Source code various unit tests
54+
├── types # Source code that handles various object types
55+
56+
```
57+
58+
## Contribute Workflow
59+
60+
PRs are always welcome, even if they only contain small fixes like typos or a few
61+
lines of code. If there will be a significant effort, please document it as an
62+
issue and get a discussion going before starting to work on it.
63+
64+
Please submit a PR broken down into small changes bit by bit. A PR consisting of
65+
a lot features and code changes may be hard to review. It is recommended to
66+
submit PRs in an incremental fashion.
67+
68+
Note: If you split your pull request to small changes, please make sure any of
69+
the changes goes to master will not break anything. Otherwise, it can not be
70+
merged until this feature complete.
71+
72+
## Develop, Build and Test
73+
74+
Write code on the new branch in your fork. The coding style used in stacker is
75+
suggested by the Golang community. See the [style doc](https://github.com/golang/go/wiki/CodeReviewComments) for details.
76+
77+
Try to limit column width to 120 characters for both code and markdown documents
78+
such as this one.
79+
80+
As we are enforcing standards set by
81+
[golangci-lint](https://github.com/golangci/golangci-lint), please always run a full 'make' on source
82+
code before committing your changes. This will trigger compilation, unit tests
83+
and linting. If it reports an issue, in general, the preferred action is to fix
84+
the code. We try to enforce the guideline that code coverage doesn't drop as
85+
code is added or modified.
86+
87+
## Automated Testing (via CI/CD)
88+
89+
Once your pull request has been opened, stacker will start a full CI pipeline
90+
against it that compiles, and runs unit tests and linters.
91+
92+
## Reporting issues
93+
94+
It is a great way to contribute to stacker by reporting an issue. Well-written
95+
and complete bug reports are always welcome! Please open an issue on Github and
96+
follow the template to fill in required information.
97+
98+
Before opening any issue, please look up the existing issues to avoid submitting
99+
a duplication. If you find a match, you can "subscribe" to it to get notified on
100+
updates. If you have additional helpful information about the issue, please
101+
leave a comment.
102+
103+
When reporting issues, always include:
104+
105+
Build environment (golang compiler, etc)
106+
Configuration files of stacker
107+
108+
Log files as per configuration.
109+
110+
Because the issues are open to the public, when submitting the log
111+
and configuration files, be sure to remove any sensitive
112+
information, e.g. user name, password, IP address, and company name.
113+
You can replace those parts with "REDACTED" or other strings like
114+
"****".
115+
116+
Be sure to include the steps to reproduce the problem if applicable.
117+
It can help us understand and fix your issue faster.
118+
119+
## Documenting
120+
121+
Update the documentation if you are creating or changing features. Good
122+
documentation is as important as the code itself.
123+
124+
The main location for the documentation is the website repository. The images
125+
referred to in documents can be placed in docs/img in that repo.
126+
127+
Documents are written with Markdown. See Writing on GitHub for more details.
128+
129+
## Design New Features
130+
131+
You can propose new designs for existing stacker features. You can also design
132+
entirely new features, Please submit a proposal in GitHub issues. stacker
133+
maintainers will review this proposal as soon as possible. This is necessary to
134+
ensure the overall architecture is consistent and to avoid duplicated work in
135+
the roadmap.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Project Structure
2+
3+
```
4+
.
5+
...
6+
├── atomfs # Source code contains the main atomfs logic
7+
├── cmd # Source code that handles commandline logic
8+
├── container # Source code for container management
9+
├── embed-exec # Source code for converting a file to a exec cmd
10+
├── lib # Source code contains helper routines
11+
├── log # Source code that handles logging
12+
├── mount # Source code that handles the mount logic
13+
├── mtree # Source code that handles the mtree logic
14+
├── oci # Source code that handles the OCI layout logic
15+
├── overlay # Source code that handles overlayfs logic
16+
├── squashfs # Source code that handles squashfs logic
17+
├── storage # Source code contains common storage code
18+
├── test # Source code various unit tests
19+
├── types # Source code that handles various object types
20+
21+
```

0 commit comments

Comments
 (0)