[lxc-devel] [lxd/master] doc: Add new developer guide to contributing.md

Grayson112233 on Github lxc-bot at linuxcontainers.org
Mon Dec 16 01:38:14 UTC 2019


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 551 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20191215/086cad19/attachment.bin>
-------------- next part --------------
From 6885be9401817a07764217134baa20ec2be3ee00 Mon Sep 17 00:00:00 2001
From: Grayson112233 <graysonpike at gmail.com>
Date: Sun, 15 Dec 2019 19:33:44 -0600
Subject: [PATCH] doc: Add new developer guide to contributing.md

Signed-off-by: Grayson Pike <graysonpike at gmail.com>
---
 doc/contributing.md | 38 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/doc/contributing.md b/doc/contributing.md
index 7a8b8ea550..2d1cc66a51 100644
--- a/doc/contributing.md
+++ b/doc/contributing.md
@@ -90,3 +90,41 @@ Sorry, no pseudonyms or anonymous contributions are allowed.
 
 We also require each commit be individually signed-off by their author,
 even when part of a larger set. You may find `git commit -s` useful.
+
+## Getting Started Developing
+
+Follow the steps below to set up your development environment to get started working on new features for LXD.
+
+### Building Dependencies
+
+To build dependencies, you can follow the instructions in [the README.md](index.md) under the "Installing LXD from Source" section.
+
+### Adding Your Fork Remote
+
+After building your dependencies, you can now add your GitHub fork as a remote and switch to it:
+```bash
+git remote add myfork git at github.com:<your_username>/lxd.git
+git remote update
+git checkout myfork/master
+```
+
+### Building LXD
+
+Finally, you should be able to `make` inside the repository and build your fork of the project.
+
+At this point, you would most likely want to create a new branch for your changes on your fork:
+
+```bash
+git checkout -b [name_of_your_new_branch]
+git push myfork [name_of_your_new_branch]
+```
+
+### Important Notes for New LXD Contributors
+
+- Persistent data is stored in the `LXD_DIR` directory which is generated by `lxd init`. The `LXD_DIR` defaults to `/var/lib/lxd`.
+- As you develop, you may want to change the `LXD_DIR` for your fork of LXD so as to avoid version conflicts.
+- Binaries compiled from your source will be generated in the `~/go/bin` directory by default.
+    - You will need to explicitly invoke these binaries (not the global `lxd` you may have installed) when testing your changes.
+    - You may choose to create an alias in your `~/.bashrc` to call these binaries with the appropriate flags more conveniently.
+- If you have a systemd service configured to run the LXD daemon from a previous installation of LXD, you may want to disable it to avoid version conflicts.
+


More information about the lxc-devel mailing list