Change-Id: Ib8754cbbb3c63f9efdfdb73299e6e2824ee0c48e
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/8500
Reviewed-by: Ankit Jain <ankitja@vmware.com>
Tested-by: Anish Swaminathan <anishs@vmware.com>
| ... | ... |
@@ -163,7 +163,7 @@ |
| 163 | 163 |
- [Version skipping upgrade](photon_admin/Photon-RPM-OSTree-5-Host-updating-operations.md#version-skipping-upgrade) |
| 164 | 164 |
- [Tracking parent commits](photon_admin/Photon-RPM-OSTree-5-Host-updating-operations.md#tracking-parent-commits) |
| 165 | 165 |
- [Resetting a branch to a previous commit](photon_admin/Photon-RPM-OSTree-5-Host-updating-operations.md#resetting-a-branch-to-a-previous-commit) |
| 166 |
- - [Installing a Photon RPM-OSTree Package](photon_admin/Photon-RPM-OSTree-6-Installing-a-server.md) |
|
| 166 |
+ - [Creating a Photon RPM-OSTree Package](photon_admin/Photon-RPM-OSTree-6-Installing-a-server.md) |
|
| 167 | 167 |
- [Composing your first OSTree repo](photon_admin/Photon-RPM-OSTree-6-Installing-a-server.md#composing-your-first-OSTree-repo) |
| 168 | 168 |
- [Installing a Photon RPM-OStree host against a custom server repository](photon_admin/Photon-RPM-OSTree-7-Installing-a-host-against-a-custom-server-repository.md) |
| 169 | 169 |
- [Manual install of a custom host](photon_admin/Photon-RPM-OSTree-7-Installing-a-host-against-a-custom-server-repository.md#manual-install-of-a-custom-host) |
| ... | ... |
@@ -214,8 +214,8 @@ Let's upgrade and replace the .0 image by a .3 build that contains git and also |
| 214 | 214 |
``` |
| 215 | 215 |
root@photon-host-cus1 [ ~ ]# rpm-ostree status |
| 216 | 216 |
TIMESTAMP (UTC) VERSION ID OSNAME REFSPEC |
| 217 |
-* 2015-09-04 00:36:37 1.0_tp2_minimal.2 092e21d292 photon photon:photon/tp2/x86_64/minimal |
|
| 218 |
- 2015-08-20 22:27:43 1.0_tp2_minimal 2940e10c4d photon photon:photon/tp2/x86_64/minimal |
|
| 217 |
+* 2015-09-04 00:36:37 3.0_tp2_minimal.2 092e21d292 photon photon:photon/tp2/x86_64/minimal |
|
| 218 |
+ 2015-08-20 22:27:43 3.0_tp2_minimal 2940e10c4d photon photon:photon/tp2/x86_64/minimal |
|
| 219 | 219 |
|
| 220 | 220 |
root@photon-host-cus1 [ ~ ]# rpm-ostree upgrade |
| 221 | 221 |
Updating from: photon:photon/tp2/x86_64/minimal |
| ... | ... |
@@ -231,11 +231,11 @@ Upgrade prepared for next boot; run "systemctl reboot" to start a reboot |
| 231 | 231 |
|
| 232 | 232 |
root@photon-host-cus1 [ ~ ]# rpm-ostree status |
| 233 | 233 |
TIMESTAMP (UTC) VERSION ID OSNAME REFSPEC |
| 234 |
- 2015-09-06 18:12:08 1.0_tp2_minimal.3 d16aebd803 photon photon:photon/tp2/x86_64/minimal |
|
| 235 |
-* 2015-09-04 00:36:37 1.0_tp2_minimal.2 092e21d292 photon photon:photon/tp2/x86_64/minimal |
|
| 234 |
+ 2015-09-06 18:12:08 3.0_tp2_minimal.3 d16aebd803 photon photon:photon/tp2/x86_64/minimal |
|
| 235 |
+* 2015-09-04 00:36:37 3.0_tp2_minimal.2 092e21d292 photon photon:photon/tp2/x86_64/minimal |
|
| 236 | 236 |
``` |
| 237 | 237 |
|
| 238 |
-After reboot from 1.0_tp2_minimal.3 build, let's check that the 3-way /etc merge succeeded as expected. The docker.service slink is still there, and docker demon restarted at boot. |
|
| 238 |
+After reboot from 3.0_tp2_minimal.3 build, let's check that the 3-way /etc merge succeeded as expected. The docker.service slink is still there, and docker demon restarted at boot. |
|
| 239 | 239 |
|
| 240 | 240 |
``` |
| 241 | 241 |
root@photon-host-cus1 [ ~ ]# ls -l /etc/systemd/system/multi-user.target.wants/docker.service |
| ... | ... |
@@ -1,10 +1,45 @@ |
| 1 |
-# Installing a Photon RPM-OSTree Package |
|
| 1 |
+# Creating a Server |
|
| 2 | 2 |
|
| 3 | 3 |
Photon OS 3.0 includes a `rpm-ostree-repo` package that can be installed on a VM. |
| 4 | 4 |
|
| 5 | 5 |
This package provides an automated script that creates a repo tree that acts as a server. |
| 6 | 6 |
|
| 7 |
-## Composing your first OSTree repo |
|
| 7 |
+Run the following commands to create a server: |
|
| 8 |
+ |
|
| 9 |
+``` |
|
| 10 |
+tdnf install rpm-ostree-repo |
|
| 11 |
+``` |
|
| 12 |
+ |
|
| 13 |
+A script is created, which provides options to create a server. |
|
| 14 |
+<p>Script to create a Photon OSTree repo |
|
| 15 |
+Usage: |
|
| 16 |
+ |
|
| 17 |
+``` |
|
| 18 |
+/usr/bin/rpm-ostree-server/mkostreerepo -r=<repo path> |
|
| 19 |
+/usr/bin/rpm-ostree-server/mkostreerepo -r=<repo path> -p=<json treefile> |
|
| 20 |
+/usr/bin/rpm-ostree-server/mkostreerepo -c -r=<repo path> -p=<json treefile> |
|
| 21 |
+-r|--repopath <Provide repo path> |
|
| 22 |
+-p|--jsonfile <Provide Json file> |
|
| 23 |
+-c|--customrepo <Provide custom repo file inside repo path directory> |
|
| 24 |
+``` |
|
| 25 |
+**Note** |
|
| 26 |
+ |
|
| 27 |
+- Use **PATH=$PATH:/usr/bin/rpm-ostree-server** and then use **mkostreerepo** from any directory for ease of use. |
|
| 28 |
+- **mkostreerepo** is used to create the fresh tree for ostree. |
|
| 29 |
+- **mkostreerepo** is also used to update a new commit to the existing tree. |
|
| 30 |
+- You can also use custom repo as to create/append the tree. |
|
| 31 |
+ |
|
| 32 |
+ |
|
| 33 |
+ |
|
| 34 |
+ |
|
| 35 |
+Run the following command to initiate the script, choose different help options to create a server. |
|
| 36 |
+ |
|
| 37 |
+ |
|
| 38 |
+``` |
|
| 39 |
+mkostreerepo |
|
| 40 |
+``` |
|
| 41 |
+ |
|
| 42 |
+## Manually Composing your OSTree repo |
|
| 8 | 43 |
|
| 9 | 44 |
Use the following commands to initialize a new repo and to compose it. |
| 10 | 45 |
|
| ... | ... |
@@ -14,6 +49,4 @@ root [ /srv/rpm-ostree ]# ostree --repo=repo init --mode=archive-z2 |
| 14 | 14 |
root [ /srv/rpm-ostree ]# rpm-ostree compose tree --repo=repo photon-base.json |
| 15 | 15 |
``` |
| 16 | 16 |
|
| 17 |
-You can now deploy a host. For more information, see [File oriented server operations](Photon-RPM-OStree-8-File-oriented-server-operations.md) and [Package oriented server operations](Photon-RPM-OSTree-9-Package-oriented-server-operations.md) to learn create your own customized file tree. |
|
| 18 |
- |
|
| 19 |
- |
|
| 17 |
+You can now deploy a host. For more information, see [File oriented server operations](Photon-RPM-OStree-8-File-oriented-server-operations.md) and [Package oriented server operations](Photon-RPM-OSTree-9-Package-oriented-server-operations.md) to learn create your own customized file tree. |
|
| 20 | 18 |
\ No newline at end of file |
| ... | ... |
@@ -8,7 +8,6 @@ The number of packages included in the RPMS repo in Photon OS 3.0 increased sign |
| 8 | 8 |
|
| 9 | 9 |
You can compose your own RPM-OSTRee server in the following two ways: |
| 10 | 10 |
|
| 11 |
- |
|
| 12 | 11 |
1. By Manually executing the below command: |
| 13 | 12 |
``` |
| 14 | 13 |
root [ /srv/rpm-ostree ]# ostree --repo=repo init --mode=archive-z2 |
| ... | ... |
@@ -19,7 +18,6 @@ You can compose your own RPM-OSTRee server in the following two ways: |
| 19 | 19 |
|
| 20 | 20 |
## Installing an RPM-OSTree host |
| 21 | 21 |
|
| 22 |
-Photon OS 2.0 installer no longer includes a UI option to deploy a host manually - either against a default or a custom server repo, and also there is no official online Photon OS 2.0 OSTree repo published. This is now completely customer driven. |
|
| 23 | 22 |
Automated host install is supported, as explained in [Chapter 7.2 Automated install of a custom host via kickstart](Photon-RPM-OSTree-7-Installing-a-host-against-a-custom-server-repository.md#72-automated-install-of-a-custom-host-via-kickstart). |
| 24 | 23 |
|
| 25 | 24 |
## Rebasing a host from Photon 1.0 to 3.0 |
| ... | ... |
@@ -39,7 +37,7 @@ http://10.197.103.175:8000/repo |
| 39 | 39 |
3. Rebase your host to the new 2.0 server and Refspec. |
| 40 | 40 |
|
| 41 | 41 |
``` |
| 42 |
- root@ostree-host [ ~ ]# ostree remote add photon2 http://10.197.103.204:8000/repo --no-gpg-verify |
|
| 42 |
+ root@ostree-host [ ~ ]# ostree remote add photon-2 http://10.197.103.204:8000/repo --no-gpg-verify |
|
| 43 | 43 |
root@ostree-host [ ~ ]# rpm-ostree rebase photon-2:photon/3.0/x86_64/minimal |
| 44 | 44 |
|
| 45 | 45 |
Rebasing to photon-2:photon/3.0/x86_64/minimal |
| ... | ... |
@@ -37,7 +37,7 @@ |
| 37 | 37 |
- [Version skipping upgrade](Photon-RPM-OSTree-5-Host-updating-operations.md#version-skipping-upgrade) |
| 38 | 38 |
- [Tracking parent commits](Photon-RPM-OSTree-5-Host-updating-operations.md#tracking-parent-commits) |
| 39 | 39 |
- [Resetting a branch to a previous commit](Photon-RPM-OSTree-5-Host-updating-operations.md#resetting-a-branch-to-a-previous-commit) |
| 40 |
-- [Installing a Photon RPM-OSTree Package](Photon-RPM-OSTree-6-Installing-a-server.md) |
|
| 40 |
+- [Creating a Server](Photon-RPM-OSTree-6-Installing-a-server.md) |
|
| 41 | 41 |
- [Composing your first OSTree repo](Photon-RPM-OSTree-6-Installing-a-server.md#composing-your-first-OSTree-repo) |
| 42 | 42 |
- [Installing a Photon RPM-OStree host against a custom server repository](Photon-RPM-OSTree-7-Installing-a-host-against-a-custom-server-repository.md) |
| 43 | 43 |
- [Manual install of a custom host](Photon-RPM-OSTree-7-Installing-a-host-against-a-custom-server-repository.md#manual-install-of-a-custom-host) |
| ... | ... |
@@ -103,7 +103,7 @@ |
| 103 | 103 |
- [Version skipping upgrade](Photon-RPM-OSTree-5-Host-updating-operations.md#version-skipping-upgrade) |
| 104 | 104 |
- [Tracking parent commits](Photon-RPM-OSTree-5-Host-updating-operations.md#tracking-parent-commits) |
| 105 | 105 |
- [Resetting a branch to a previous commit](Photon-RPM-OSTree-5-Host-updating-operations.md#resetting-a-branch-to-a-previous-commit) |
| 106 |
- - [Installing a Photon RPM-OSTree Package](Photon-RPM-OSTree-6-Installing-a-server.md) |
|
| 106 |
+ - [Creating a Server](Photon-RPM-OSTree-6-Installing-a-server.md) |
|
| 107 | 107 |
- [Composing your first OSTree repo](Photon-RPM-OSTree-6-Installing-a-server.md#composing-your-first-OSTree-repo) |
| 108 | 108 |
- [Installing a Photon RPM-OStree host against a custom server repository](Photon-RPM-OSTree-7-Installing-a-host-against-a-custom-server-repository.md) |
| 109 | 109 |
- [Manual install of a custom host](Photon-RPM-OSTree-7-Installing-a-host-against-a-custom-server-repository.md#manual-install-of-a-custom-host) |