Using Git and TKLDEV to build your own customized Turnkeylinux (etc) resource set
Learning anything takes some practice. I have been hoverting around my reentry for a bit now and went in for a landing. I am going to do my best to build a customized set of builds based upon the Turnkeylinux set of apps, but one which is more flexible and more customizable to my own needs.
Here are some of my process notes. It seems to be going pretty well.
- Sign on to hub.turnkeylinux.com
- Set up a Micro Server via the hub to run TKLDEV
- Sign on to Github
- Go to your https://github.com/turnkeylinux-apps
- Choose the Core App
- Fork it into your own repository set (this will be suggested by Github)
- Choose the TKLDEV App
- Fork it into your repository set
- Choose someother App you want to work with (I will do Joomla and Odoo for now)
- Fork it (or them separately) into your repository set.
- Choose the Core App
- Go to your Repository Root
- For each new repository
- Make a new "Branch" with some operative name for your work
- Option - but recomended
- Make the new branch be the "default" branch for you (rather than "master" being default)
- For each new repository
- Go to your https://github.com/turnkeylinux-apps
- Log into your TKLDEV Box via SSH - ie Putty. Iin my case the TKLDEV generated on hub.turnkeylinux.com)
- cd / (out of /root)
- cd turnkey (1 and 2 together could be "cd /turnkey")
- cd products (1 and 2 and 3 together could be "cd /turnkey/products")
- Clone each of your repositories (using the -b default_branch_name) to your products directory using a command like the following
- git clone https://github.com/your-user-name/your-turnkeyapp-repository -b default_branch_name
- cd (from products) to one of the new cloned directories
- issue the "make" command
- If you want to remove and start over I use the following
- rm -rf directory_name
- I may have to "restart" the server if I cannot complete because some chroot is running after a "make command".. After reboot again use the rm -rf directory_name command to clear it.
- I am right there now. I will start working with Git on my personal branches and see what modifications I can run
- My specific focus will be on TKLDEV modifications.
- If I want to use those modifications actually "inside" my operating TKLDEV appliance I will likley need to Link the Code directly - which means this is a Line of my TODO list.
- Now to BuildTasks
- Forked https://github.com/turnkeylinux/buildtasks into my repository set -ie https://github.com/my-user-name
- Created a Branch - my name
- Made the Branch "Default"
- Opened GitHub Desktop
- Cloned https://github.com/my-user-name/buildtasks into my GitHub Desktop
- copied bt-xen into bt-mine
- copied /patch/xen/ into /patch/mine (min is a pseudonym)
- Made a Commit with Summary and Detail Annotation
- Pushed the Commit with Summary and Detail Annotation
- Opened my TKLDEV Machine with PUTTY (SSH)
- Navigate with
- cd /turnkey
- dir (to be sure)
- rm -rf buildtasks
- that removed the buildtasks directory so that I can clone my repository
- git clone https://github.com/my-user-name/buildtasks -b my-branch-name
- technically the branch part should be covered automatically as I set it as default in github directly, but I try to be safe and specify the branches explicity.
- Navigate with
That takes me to where I am now.
I need to start working on my Build Processes next. Also, quite explicitly, I will need to overtly change the "include" command for buildtasks if I go to make new TKLDEV systems that use my buildtasks. However, it seems easy enough just to change it manually as I have just done to my working TKLDEV server.
- 3 Changes made in Buildtasks (XEN) directory
- Committed Changes
- Pushed Changes
- Went to Putty: Git Pull (3 Changes Made)
Lets Test a build
UPDATE: 10/23/2019
The Build process worked well. I then had to wrangle (again) with network settings inside of my Server Build, but those were not related specifically to the TKLDEV process.
From here I will move the changes I made into my own BT-process and see if I can replicate my results and also get the few more tweaks for my server build integrated as well.
I need to understand a-bit about the Patching process and how it applies to files outside of build tasks (ie, small changes to the Core build). I also will need to test various updates from REPOS and TKLBAM to see that I can have my changes from TKLDEV stick.
All for Now. Very excited about the project.
(Postscript)
To build in XEN, ie (check /mnt/isos for valid build names after)
./bt-iso appname-x.x-stretch-amd64
followed by
./bt-xen appname-x.x-stretch-amd64