Browse code

migrated 1.0 and 2.0 docs and updated links and TOC

Change-Id: I2f8c83ae24ed3c1e2ec23322daa45e769f49f90a
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/5881
Reviewed-by: Stuart Clements <sclements@vmware.com>
Tested-by: Stuart Clements <sclements@vmware.com>

Vidya Vasudevan authored on 2018/10/08 18:37:49
Showing 76 changed files
... ...
@@ -1,3 +1,5 @@
1
+# Photon OS Frequently Asked Questions
2
+
1 3
 * [What is Photon OS?](#q-what-is-photon-os)
2 4
 * [How do I get started with Photon OS?](#q-how-do-i-get-started-with-photon-os)
3 5
 * [Can I upgrade my existing Photon OS 1.0 VMs?](#q-can-i-upgrade-my-existing-photon-os-10-vms)
... ...
@@ -33,11 +35,11 @@ A. Photon OS™ is an open source Linux container host optimized for cloud-nativ
33 33
 
34 34
 ## Q. How do I get started with Photon OS?
35 35
 A. Start by deciding your target platform. Photon OS 2.0 has been certified in public cloud environments - Microsoft Azure (new), Google Compute Engine (GCE), Amazon Elastic Compute Cloud (EC2) - as well as on VMware vSphere, VMware Fusion, and VMware Workstation.
36
-Next, download the latest binary distributions for your target platform. The binaries are hosted on [https://bintray.com/vmware/photon/](https://bintray.com/vmware/photon/). For download instructions, see [Downloading Photon OS](https://github.com/vmware/photon/wiki/Downloading-Photon-OS).
37
-Finally, go to the installation instructions for your target platform, which are listed here: [https://github.com/vmware/photon/wiki](https://github.com/vmware/photon/wiki).
36
+Next, download the latest binary distributions for your target platform. The binaries are hosted on [https://bintray.com/vmware/photon/](https://bintray.com/vmware/photon/). For download instructions, see [Downloading Photon OS](Downloading-Photon-OS.md).
37
+Finally, go to the installation instructions for your target platform, which are listed here:  [Quick Start](photon-admin-guide.md#getting-started-with-photon-os-20).
38 38
 
39 39
 ## Q. Can I upgrade my existing Photon OS 1.0 VMs?
40
-A. Yes, there is an in-place upgrade path for Photon OS 1.0 implementations. You simply download an upgrade package, run a script, and reboot the VM. Refer to the instructions in [Upgrading to Photon OS 2.0](https://github.com/vmware/photon/wiki/Upgrading-to-Photon-OS-2.0).
40
+A. Yes, there is an in-place upgrade path for Photon OS 1.0 implementations. You simply download an upgrade package, run a script, and reboot the VM. Refer to the instructions in [Upgrading to Photon OS 2.0](Upgrading-to-Photon-OS-2.0.md).
41 41
 
42 42
 ## Q. What kind of support comes with Photon OS?
43 43
 A. Photon OS is supported through community efforts and direct developer engagement in the communities. Potential users of Photon OS should start with the [Photon microsite](http://vmware.com/photon).
44 44
deleted file mode 100644
... ...
@@ -1,29 +0,0 @@
1
-![Photon](https://cloud.githubusercontent.com/assets/11306358/9800286/cb4c9eb6-57d1-11e5-916c-6eba8e40fa99.png)
2
-# Welcome to the Photon OS Wiki
3
-
4
-This wiki serves as an unofficial supplement to the documentation that is published in the project .md files. 
5
-
6
-### Photon OS 2.0 GA Available!
7
-
8
-Photon OS 2.0 introduces new security and OS management capabilities, along with new and updated packages for cloud-native applications and VMware appliances. To download the distribution images, go to [Downloading Photon OS](https://github.com/vmware/photon/wiki/Downloading-Photon-OS). To learn more, see [What is New in Photon OS 2.0](https://github.com/vmware/photon/wiki/What-is-New-in-Photon-OS-2.0).
9
-
10
-# Table of Contents
11
-
12
-1. [Frequently Asked Questions](https://github.com/vmware/photon/wiki/Frequently-Asked-Questions)
13
-2. Getting Started Guides
14
-    * [Downloading Photon OS](https://github.com/vmware/photon/wiki/Downloading-Photon-OS)
15
-    * [Running Photon OS on vSphere](https://github.com/vmware/photon/wiki/Running-Photon-OS-on-vSphere)
16
-    * [Running Photon OS on Fusion](https://github.com/vmware/photon/wiki/Running-Project-Photon-on-Fusion)
17
-    * [Running Photon OS on Workstation](https://github.com/vmware/photon/wiki/Running-Photon-OS-on-Workstation)
18
-    * [Running Photon OS on AWS EC2](https://github.com/vmware/photon/wiki/Running-Photon-OS-on-Amazon-Elastic-Cloud-Compute)
19
-    * [Running Photon OS on Microsoft Azure](https://github.com/vmware/photon/wiki/Running-Photon-OS-on-Microsoft-Azure)
20
-    * [Running Photon OS on Google Compute Engine](https://github.com/vmware/photon/wiki/Running-Photon-OS-on-Google-Compute-Engine)
21
-
22
-3. Administration Guides
23
-    * [Photon OS Administration Guide](https://github.com/vmware/photon/blob/master/docs/photon-admin-guide.md)
24
-    * [How to use Photon Management Daemon](https://github.com/vmware/photon/blob/master/docs/pmd-cli.md)
25
-
26
-4. How-To Guides
27
-    * [Install and Configure a Swarm Cluster with DNS Service on Photon OS](https://github.com/vmware/photon/wiki/Install-and-Configure-a-Swarm-Cluster-with-DNS-Service-on-PhotonOS)
28
-    * [Install and Configure a Production Ready Mesos Cluster on Photon OS](https://github.com/vmware/photon/wiki/Install-and-Configure-a-Production-Ready-Mesos-Cluster-on-Photon-OS)
29
- 
... ...
@@ -1,14 +1,14 @@
1
-**Installing the Lightwave Client on a Photon Image and Joining the Client to a Domain**
1
+# Installing the Lightwave Client on a Photon Image and Joining the Client to a Domain
2 2
 
3 3
 After you have set up a Lightwave domain controller, you can join Photon clients to that domain. You install the Lightwave client first. After the client is installed, you join the client to the domain.
4 4
 
5
-**Prerequisites**
5
+## Prerequisites
6 6
 
7 7
 - Prepare a Photon OS client for the Lightwave client installation.
8 8
 - Verify that the hostname of the client can be resolved.
9 9
 - Verify that you have 184 MB free for the Lightwave client installation.
10 10
 
11
-**Procedure**
11
+## Procedure
12 12
 
13 13
 1. Log in to your Photon OS client over SSH.
14 14
 2. Install the Lightwave client by running the following command. 
... ...
@@ -1,14 +1,14 @@
1
-**Installing the Lightwave Server and Configuring It as a Domain Controller on a Photon Image**
1
+# Installing the Lightwave Server and Configuring It as a Domain Controller on a Photon Image
2 2
 
3 3
 You can configure Lightwave server as domain controller on a Photon client. You install the Lightwave server first. After the server is installed, you configure a new domain. 
4 4
 
5
-**Prerequisites**
5
+## Prerequisites
6 6
 
7 7
 - Prepare a Photon OS client for the Lightwave server installation.
8 8
 - Verify that the hostname of the client can be resolved.
9 9
 - Verify that you have 500 MB free for the Lightwave server installation.
10 10
 
11
-**Procedure**
11
+## Procedure
12 12
 
13 13
 1. Log in to your Photon OS client over SSH as an administrator.
14 14
 2. Install the Lightwave server by running the following command. 
... ...
@@ -2,10 +2,10 @@
2 2
 
3 3
 Project Lightwave is an open-sourced project that provides enterprise-grade identity and access management services, and can be used to solve key security, governance, and compliance challenges for a variety of use cases within the enterprise. Through integration between Photon OS and Project Lightwave, organizations can enforce security and governance on container workloads, for example, by ensuring only authorized containers are run on authorized hosts, by authorized users. For more details about Lightwave, see the [project Lightwave page on GitHub](https://github.com/vmware/lightwave).
4 4
 
5
-**Procedure**
5
+## Procedure
6 6
 
7
-1. [Installing the Lightwave Server and Configuring It as a Domain Controller on a Photon Image](Installing-Lightwave-Server-and-Setting-Up-a-Domain)
8
-2. [Installing the Lightwave Client on a Photon Image and Joining the Client to a Domain](Installing-Lightwave-Client-and-Joining-a-Domain)
9
-3. [Installing the Photon Management Daemon on a Lightwave Client](Installing-the-Photon-Management-Daemon-on-a-Lightwave-Client)
10
-4. [Remotely Upgrade a Single Photon OS Machine With Lightwave Client and Photon Management Daemon Installed](Remotely-Upgrade-a-Photon-OS-Machine-With-Lightwave-Client-and-Photon-Management-Daemon-Installed)
11
-5. [Remotely Upgrade Multiple Photon OS Machines With Lightwave Client and Photon Management Daemon Installed](Remotely-Upgrade-Photon-OS-Machine-With-Lightwave-Client-and-Photon-Management-Daemon-Installed)
7
+1. [Installing the Lightwave Server and Configuring It as a Domain Controller on a Photon Image](Installing-Lightwave-Server-and-Setting-Up-a-Domain.md)
8
+2. [Installing the Lightwave Client on a Photon Image and Joining the Client to a Domain](Installing-Lightwave-Client-and-Joining-a-Domain.md)
9
+3. [Installing the Photon Management Daemon on a Lightwave Client](Installing-the-Photon-Management-Daemon-on-a-Lightwave-Client.md)
10
+4. [Remotely Upgrade a Single Photon OS Machine With Lightwave Client and Photon Management Daemon Installed](Remotely-Upgrade-a-Photon-OS-Machine-With-Lightwave-Client-and-Photon-Management-Daemon-Installed.md)
11
+5. [Remotely Upgrade Multiple Photon OS Machines With Lightwave Client and Photon Management Daemon Installed](Remotely-Upgrade-Photon-OS-Machine-With-Lightwave-Client-and-Photon-Management-Daemon-Installed.md)
... ...
@@ -1,14 +1,14 @@
1
-**Installing the Photon Management Daemon on a Lightwave Client**
1
+# Installing the Photon Management Daemon on a Lightwave Client 
2 2
 
3 3
 After you have installed and configured a domain on Lightwave, and joined a client to the domain, you can install the Photon Management Daemon on that client so that you can remotely manage it.
4 4
 
5
-**Prerequisites**
5
+## Prerequisites
6 6
 
7 7
 - Have an installed Lightwave server with configured domain controller on it.
8 8
 - Have an installed Lightwave client that is joined to the domain.
9 9
 - Verify that you have 100 MB free for the daemon installation on the client.
10 10
 
11
-**Procedure**
11
+## Procedure
12 12
 
13 13
 1. Log in to a machine with installed Lightwave client over SSH as an administrator.
14 14
 2. Install the Photon Management Daemon.
... ...
@@ -1,3 +1,5 @@
1
+# Photon OS Administration Guide and Other Documentation
2
+
1 3
 The Photon OS Administration Guide covers the basics of managing packages, controlling services with systemd, setting up networking, initializing Photon OS with cloud-init, running Docker containers, and working with other technologies, such as Kubernetes. The guide also includes a section to get you started using Photon OS quickly and easily. The guide is at the following URL: 
2 4
 
3 5
 https://github.com/vmware/photon/blob/master/docs/photon-admin-guide.md
... ...
@@ -1,11 +1,13 @@
1
-### 1.1 What is OSTree? How about RPM-OSTree?
1
+# Introduction
2
+
3
+## 1.1 What is OSTree? How about RPM-OSTree?
2 4
 
3 5
 OSTree is a tool to manage bootable, immutable, versioned filesystem trees. Unlike traditional package managers like rpm or dpkg that know how to install, uninstall, configure packages, OSTree has no knowledge of the relationship between files. But when you add rpm capabilities on top of OSTree, it becomes RPM-OSTree, meaning a filetree replication system that is also package-aware.   
4 6
 The idea behind it is to use a client / server architecture to keep your Linux installed machines (physical or VM) in sync with the latest bits, in a predictable and reliable manner. To achieve that, OSTree uses a git-like repository that records the changes to any file and replicate them to any subscriber.  
5 7
 A system administrator or an image builder developer takes a base Linux image, prepares the packages and other configuration on a server box, executes a command to compose a filetree that the host machines will download and then incrementally upgrade whenever a new change has been committed.
6 8
 You may read more about OSTree [here](https://wiki.gnome.org/Projects/OSTree).
7 9
 
8
-### 1.2 Why use RPM-OSTree in Photon?
10
+## 1.2 Why use RPM-OSTree in Photon?
9 11
 There are several important benefits:
10 12
 * Reliable, efficient: The filetree replication is simple, reliable and efficient. It will only transfer deltas over the network. If you have deployed two almost identical bootable images on same box (differing just by several files), it will not take twice the space. The new tree will have a set of hardlinks to the old tree and only the different files will have a separate copy stored to disk.
11 13
 * Atomic: the filetree replication is atomic. At the end of a deployment, you are either booting from one deployment, or the other. There is no "partial deployed bootable image". If anything bad happens during replication or deployment- power loss, network failure, your machine boots from the old image. There is even a tool option to cleanup old deployed (successfully or not) image.
... ...
@@ -17,36 +19,34 @@ As drawbacks, I would mention:
17 17
 * People not used with "read only" file systems will be disappointed that they could no longer use RPM, yum, tdnf to install whatever they want. Think of this as an "enterprise policy". They may circumvent this by customizing the target directory to a writable directory like /var or using rpm to install packages and record them using a new RPM repository in a writable place.
18 18
 * Administrators need to be aware about the directories re-mapping specific to OSTree and plan accordingly.
19 19
 
20
-### 1.3 Photon with RPM-OSTree installation profiles
20
+## 1.3 Photon with RPM-OSTree installation profiles
21 21
 Photon takes advantage of RPM-OSTree and offers several installation choices:
22 22
 * Photon RPM-OSTree server - used to compose customized Photon OS installations and to prepare updates. I will call it for short 'server'.
23 23
 * Photon RPM-OSTree host connected to a default online server repository via http or https, maintained by VMware Photon OS team, where future updates will be published. This will create a minimal installation profile, but with the option to self-upgrade. I will call it for short 'default host'.
24 24
 * Photon RPM-OSTree host connected to a custom server repository. It requires a Photon RPM-OSTree Server installed in advance. I will call it for short 'custom host'.
25 25
 
26
-### 1.4 Terminology
26
+## 1.4 Terminology
27 27
 I use the term "OSTree" (starting with capitals) throughout this document, when I refer to the general use of this technology, the format of the repository or replication protocol. I use "RPM-OSTree" to emphasize the layer that adds RedHat Package Manager compatibility on both ends - at server and at host. However, since Photon OS is an RPM-based Linux, there are places in the documentation and even in the installer menus where "OSTree" may be used instead of "RPM-OSTree" when the distinction is not obvious or doesn't matter in that context.
28 28
 When "ostree" and "rpm-ostree" (in small letters) are encountered, they refer to the usage of the specific Unix commands.   
29 29
 
30 30
 Finally, "Photon RPM-OSTree" is the application or implementation of RPM-OStree system into Photon OS, materialized into two options: Photon Server and Photon Host (or client). "Server" or "Host" may be used with or without the "Photon" and/or "RPM-OStree" qualifier, but it means the same thing. 
31 31
 
32
-### 1.5 Sample code
33
-Codes samples used throughout the book are small commands that can be typed at shell command prompt and do not require downloading additional files. As an alternative, one can remote via ssh, so cut & paste sample code from outside sources or copy files via scp will work. See the Photon Administration guide to learn [how to enable ssh](https://github.com/vmware/photon/blob/1.0/docs/photon-admin-guide.md#permitting-root-login-with-ssh). 
32
+## 1.5 Sample code
33
+Codes samples used throughout the book are small commands that can be typed at shell command prompt and do not require downloading additional files. As an alternative, one can remote via ssh, so cut & paste sample code from outside sources or copy files via scp will work. See the Photon Administration guide to learn [how to enable ssh](photon-admin-guide.md#permitting-root-login-with-ssh). 
34 34
 The samples assume that the following VMs have been installed - see the steps in the next chapters:
35 35
 * A default host VM named **photon-host-def**.
36 36
 * Two server VMs named **photon-srv1** and **photon-srv2**.
37 37
 * Two custom host VMs named **photon-host-cus1** and **photon-host-cus2**, connected each to the corresponding server during install.
38 38
 
39
-### 1.6 How to read this book
39
+## 1.6 How to read this book
40 40
 I've tried to structure this book to be used both as a sequential read and as a reference documentation.   
41 41
 If you are just interested in deploying a host system and keeping it up to date, then read chapters 2 and 5.   
42 42
 If you want to install your own server and experiment with customizing packages for your Photon hosts, then read chapters 6 to 9. There are references to the concepts discussed throughout the book, if you need to understand them better.  
43 43
 However, if you want to read page by page, information is presented from simple to complex, although as with any technical book, we occasionally run into the chicken and egg problem - forward references to concepts that have yet to be explained later. In other cases, concepts are introduced and presented in great detail that may be seem hard to follow at first, but I promise they will make sense in the later pages when you get to use them.
44 44
 
45
-### 1.7 Difference between versions
45
+## 1.7 Difference between versions
46 46
 This book has been written when Photon 1.0 was released, so all the information presented apply directly to Photon 1.0 and also to Photon 1.0 Revision 2 (in short Photon 1.0 Rev2 or Photon 1.0r, as some people refer to it as Photon 1.0 Refresh). This release is relevant to OSTree, because of ISO including an updated RPM-OSTree repository containing upgraded packages, as well as matching updated online repo that plays well into the upgrade story. Other than that, differences are minimal.  
47 47
 
48
-The guide has been updated significantly for Photon OS 2.0. Information of what's different is scattered through chapters 2, 6, 7, 8. [[Chapter 12|Photon-RPM-OSTree:-Install-or-rebase-to-Photon-OS-2.0]] is dedicated to the topic.    
48
+The guide has been updated significantly for Photon OS 2.0. Information of what's different is scattered through chapters 2, 6, 7, 8. [Install or rebase to Photon OS 2.0](Photon-RPM-OSTree-Install-or-rebase-to-Photon-OS-2.0.md) is dedicated to the topic.    
49 49
 
50 50
 OSTree technology is evolving too and rather than pointing out at what package version some feature has been introduced or changed, the focus is on the ostree and rpm-ostree package versions included with the Photon OS major releases.
51
-
52
-[[Back to main page|Photon-RPM-OSTree:-a-simple-guide]] | [[Previous page|Photon-RPM-OSTree:-Preface]] | [[ Next page >|Photon-RPM-OSTree:-2-Installing-a-host-against-default-server-repository]]
53 51
\ No newline at end of file
... ...
@@ -1,6 +1,8 @@
1
+# Remotes
2
+
1 3
 In Chapter 3 we talked about the Refspec that contains a **photon:** prefix, that is the name of a remote. When a Photon host is installed, a remote is added - which contains the URL for an OSTree repository that is the origin of the commits we are going to pull from and deploy filetrees, in our case the Photon RPM-OSTree server we installed the host from. This remote is named **photon**, which may be confusing, because it's also the OS name and part of the Refspec (branch) path.
2 4
 
3
-### 10.1 Listing remotes
5
+## 10.1 Listing remotes
4 6
 A host repo can be configured to switch between multiple remotes to pull from, however only one remote is the "active" one at a time. We can list the remotes created so far, which brings back the expected result.
5 7
 ```
6 8
 root@photon-host-def [ ~ ]# ostree remote list
... ...
@@ -29,13 +31,13 @@ root@photon-host-cus [ ~ ]# ostree remote show-url photon
29 29
 http://10.118.101.168
30 30
 ```
31 31
 
32
-### 10.2 GPG signature verification
32
+## 10.2 GPG signature verification
33 33
 You may wonder what is the purpose of ```gpg-verify=false``` in the config file, associated with the specific remote. This will instruct any host update to skip the signing verification for the updates that come from server, resulted from tree composed locally at the server, as they are not signed. Without this, host updating will fail.  
34 34
 
35 35
 There is a whole chapter about signing, importing keys and so on that I will not get into, but the idea is that signing adds an extra layer of security, by validating that everything you download comes from the trusted publisher and has not been altered. That is the case for all Photon OS artifacts downloaded from VMware official site. All OVAs and packages, either from the online RPMS repositories or included in the ISO file - are signed by VMware. We've seen a similar setting ```gpgcheck=1``` in the RPMS repo configuration files that tdnf uses to validate or not the signature for all packages downloaded to be installed.
36 36
 
37 37
 
38
-### 10.3 Switching repositories
38
+## 10.3 Switching repositories
39 39
 Since mapping name/url is stored in the repo's config file, in principle you can re-assign a different URL, connecting the host to a different server. The next upgrade will get the latest commit chain from the new server.   
40 40
 If we edit photon-host-def's repo config and replace the bintray URL by photon-srv1's IP address, all original packages in the original 1.0_minimal version will be preserved, but any new package change (addition, removal, upgrade) added after that (in 1.0_minimal.1, 1.0_minimal.2) will be reverted and all new commits from photon-srv1 (that may have same version) will be applied. This is because the two repos are identical copies, so they have the same original commit ID as a common ancestor, but they diverge from there.  
41 41
 This may create confusion and it's one of the reasons I insisted on creating your own scheme of versioning.
... ...
@@ -43,9 +45,9 @@ This may create confusion and it's one of the reasons I insisted on creating you
43 43
 If the old and new repo have nothing in common (no common ancestor commit), this will undo even the original commit, so all commits from the new tree will be applied.  
44 44
 A better solution would be to add a new remote that will identify where the commits come from.
45 45
 
46
-### 10.4 Adding and removing remotes
46
+## 10.4 Adding and removing remotes
47 47
 
48
-A cleaner way to switch repositories is to add remotes that point to different servers. Let's add another server that we will refer to as **photon2**, along with (optional) the refspecs for branches that it provides (we will see later that in the newer OSTree versions, we don't need to know the branch names, they could be [[queried at run-time|Photon-RPM-OSTree:-10-Remotes#105-listing-available-branches]]). The 'minimal' and 'full' branch ref names containing '2.0' suggest this may be a Photon OS 2.0 RPM-OSTree server. 
48
+A cleaner way to switch repositories is to add remotes that point to different servers. Let's add another server that we will refer to as **photon2**, along with (optional) the refspecs for branches that it provides (we will see later that in the newer OSTree versions, we don't need to know the branch names, they could be [queried at run-time](Photon-RPM-OSTree-10-Remotes.md#105-listing-available-branches)). The 'minimal' and 'full' branch ref names containing '2.0' suggest this may be a Photon OS 2.0 RPM-OSTree server. 
49 49
 ```
50 50
 root@photon-host-cus [ ~ ]# ostree remote add --repo=/ostree/repo -v --no-gpg-verify photon2 http://10.118.101.86 photon/2.0/x86_64/minimal photon/2.0/x86_64/full
51 51
 root@photon-host-cus [ ~ ]# ostree remote list
... ...
@@ -70,10 +72,10 @@ root@photon-host-cus [ ~ ]# ostree remote list
70 70
 photon
71 71
 ```
72 72
 
73
-### 10.5 List available branches
73
+## 10.5 List available branches
74 74
 If a host has been deployed from a specific branch and would like to switch to a different one, maybe from a different server, how would it know what branches are available? In git, you would run ```git remote show origin``` or ```git remote -a``` (although last command would not show all branches, unless you ran ```git fetch``` first).  
75 75
 
76
-Fortunately, in Photon OS 2.0 and higher, the hosts are able to query the server, if summary metadata has been generated, as we've seen in [[8.5|Photon-RPM-OSTree:-8-File-oriented-server-operations#85-creating-summary-metadata]].  This command lists all branches available for remote **photon2**.
76
+Fortunately, in Photon OS 2.0 and higher, the hosts are able to query the server, if summary metadata has been generated, as we've seen in [8.5](Photon-RPM-OSTree:-8-File-oriented-server-operations.md#85-creating-summary-metadata).  This command lists all branches available for remote **photon2**.
77 77
 
78 78
 ```
79 79
 root@photon-host-cus [ ~ ]# ostree remote refs photon2 
... ...
@@ -85,5 +87,3 @@ photon2:photon/2.0/x86_64/minimal
85 85
 ###10.6 Switching branches (rebasing)
86 86
 
87 87
 
88
-[[Back to main page|Photon-RPM-OSTree:-a-simple-guide]] | [[Previous page|Photon-RPM-OSTree:-9-Package-oriented-server-operations]] | [[Next page >|Photon-RPM-OSTree:-11-Running-container-applications-between-bootable-images]]
89
-  
... ...
@@ -1,7 +1,9 @@
1
+# Running container applications between bootable images
2
+
1 3
 In this chapter, we want to test a docker application and make sure that all the settings and downloads done in one bootable filetree are going to be saved into writable folders and be available in the other image, in other words after reboot from the other image, everything is available exactly the same way.   
2 4
 We are going to do this twice: first, to verify an existing bootable image installed in parallel and then create a new one.
3 5
 
4
-### 11.1 Downloading a docker container appliance
6
+## 11.1 Downloading a docker container appliance
5 7
 Photon OS comes with docker package installed and configured, but we expect that the docker daemon is inactive (not started). Configuration file /usr/lib/systemd/system/docker.service is read-only (remember /usr is bound as read-only). 
6 8
 ```
7 9
 root@sample-host-def [ ~ ]# systemctl status docker
... ...
@@ -128,7 +130,7 @@ CONTAINER ID    IMAGE   COMMAND       CREATED         STATUS
128 128
 d07ebca78051    ubuntu  "/bin/bash"   16 minutes ago  Up 5 seconds                        kickass_hodgkin
129 129
 ```
130 130
 
131
-### 11.2 Rebooting into an existing image
131
+## 11.2 Rebooting into an existing image
132 132
 Now let's reboot the machine and select the other image. First, we'll verify that the docker daemon is automaically started.
133 133
 ```
134 134
 root@photon-host-cus1 [ ~ ]# systemctl status docker
... ...
@@ -154,7 +156,7 @@ Ubuntu file
154 154
 root@57dcac5d0490:/# echo "booted into existing image" >> /home/myfile
155 155
 root@57dcac5d0490:/# exit
156 156
 ```
157
-### 11.3 Reboot into a newly created image
157
+## 11.3 Reboot into a newly created image
158 158
 Let's upgrade and replace the .0 image by a .3 build that contains git and also perl_YAML (because it is a dependency of git).
159 159
 ```
160 160
 root@photon-host-cus1 [ ~ ]# rpm-ostree status
... ...
@@ -207,5 +209,3 @@ Ubuntu file
207 207
 booted into existing image
208 208
 root@57dcac5d0490:/# echo "booted into new image" >> /home/myfile
209 209
 ```
210
-
211
-[[Back to main page|Photon-RPM-OSTree:-a-simple-guide]] | [[Previous page|Photon RPM-OSTree:-10-Remotes]] | [[ Next page >|Photon-RPM-OSTree:-Install-or-rebase-to-Photon-OS-2.0]]
212 210
\ No newline at end of file
... ...
@@ -1,20 +1,22 @@
1
+# Installing a host against default server repository
2
+
1 3
 RPM-OSTree Host default server repo installation option in Photon 1.0 or 1.0 Revision 2 will setup a profile similar to Photon Minimal, with the added benefit of being able to self-upgrade.  
2 4
 Photon OS 2.0 does not offer a 'default host' installation. See chapter 7 and 12 for other options. 
3 5
 
4
-### 2.1 Who is this for?  
6
+## 2.1 Who is this for?  
5 7
 The RPM-OSTree 'default host' is the easiest way to deploy a Photon RPM-OSTree host from ISO/cdrom, without the need to deploy and maintain an RPM-OSTree server. It is targeted at the user who relies on VMware Photon OS team to keep his or her system up-to-date, configured to get its updates from the official Photon 1.0 OSTree repository.
6 8
 
7 9
 This is also the fastest way to install a host (18 seconds on my Mac with SSD after all UI choices have been entered by user), as we've included in the ISO/cdrom an identical copy of the Photon 1.0 "starter" RPM-OSTree repository that is published online by VMware Photon OS team. So rather than pulling from the online repository, the installer pulls the repo from cdrom, which saves bandwidth and also reduces to zero the chances of failing due to a networking problem. After successful installation, any updates are going to be pulled from the official online repository, when Photon OS team will make them available.    
8 10
 
9 11
 Note: It is also possible to install an RPM-OSTree host against the official online repo via PXE boot, without the benefit of fast, local pull from cdrom. This will be covered in the PXE boot/kickstart chapter, as it requires additional configuration.
10 12
 
11
-### 2.2 Installing the ISO, step by step
12
-User will first download [[Photon 1.0 ISO file|https://bintray.com/artifact/download/vmware/photon/photon-1.0-13c08b6.iso]] or the newer [[Photon 1.0 Rev2 ISO file|https://bintray.com/artifact/download/vmware/photon/photon-1.0-62c543d.iso]] that contains the installer, which is able to deploy any of the supported Photon installation profiles.
13
+## 2.2 Installing the ISO, step by step
14
+User will first download [Photon 1.0 ISO file](https://bintray.com/artifact/download/vmware/photon/photon-1.0-13c08b6.iso) or the newer [Photon 1.0 Rev2 ISO file](https://bintray.com/artifact/download/vmware/photon/photon-1.0-62c543d.iso) that contains the installer, which is able to deploy any of the supported Photon installation profiles.
13 15
 
14 16
 There are some steps common to all Photon installation profiles, starting with adding a VM in VMware Fusion, Workstation or ESXi, selecting the OS family, then customizing for disk size, CPU, memory size, network interface etc. (or leaving the defaults) and selecting the ISO image as cdrom. The installer will launch, that will go through disk partitioning and accepting the license agreement screens, followed by selecting an installation profile.
15 17
 These steps are described at the page linked below, so I won't repeat them, just that instead of setting up a Photon Minimal profile, we will install a Photon OSTree host:   
16 18
 
17
-[[Running Project Photon on Fusion|Running-Project-Photon-on-Fusion]].  
19
+[Running Project Photon on Fusion](Running-Project-Photon-on-Fusion.md).  
18 20
 
19 21
 Select the **Photon OSTree Host** option.
20 22
 
... ...
@@ -31,8 +33,6 @@ When installation is over, the VM will reboot and will show in grub VMWare Photo
31 31
 
32 32
 ![PhotonHostFirstRebootGrub](https://cloud.githubusercontent.com/assets/13158414/14757877/155614ec-08ad-11e6-9e36-b43f77b6fb69.png)  
33 33
 
34
-Boot, login and you are ready to use it!  The next chapters are about experimenting first hand and understanding in detail how everything works. If you just want to learn how to [[upgrade your host|Photon-RPM-OSTree:-5-Host-updating-operations]] when new updates are available, skip to [[Chapter 5|Photon-RPM-OSTree:-5-Host-updating-operations]].
35
-
36
-Note: If you ran Photon 1.0 Rev2 installer rather than Photon 1.0, you may notice in grub **1.0_minimal.1** rather than **1.0_minimal**, hinting of an updated, newer version installed. This will be also explained in [[Chapter 5|Photon-RPM-OSTree:-5-Host-updating-operations]].  
34
+Boot, login and you are ready to use it!  The next chapters are about experimenting first hand and understanding in detail how everything works. If you just want to learn how to [upgrade your host](Photon-RPM-OSTree-5-Host-updating-operations.md) when new updates are available, skip to [Host updating operations](Photon-RPM-OSTree-5-Host-updating-operations.md).
37 35
 
38
-[[Back to main page|Photon-RPM-OSTree:-a-simple-guide]] | [[Previous page|Photon-RPM-OSTree:-1-Introduction#photon-with-rpm-ostree-installation-profiles]] | [[ Next page >|Photon-RPM-OStree:-3-Concepts-in-action]] 
39 36
\ No newline at end of file
37
+Note: If you ran Photon 1.0 Rev2 installer rather than Photon 1.0, you may notice in grub **1.0_minimal.1** rather than **1.0_minimal**, hinting of an updated, newer version installed. This will be also explained in [Host updating operations](Photon-RPM-OSTree-5-Host-updating-operations.md).  
40 38
deleted file mode 100644
... ...
@@ -1,256 +0,0 @@
1
-There are several ostree and rpm-ostree commands that list file or package data based on either the Commit ID, or Refspec. If Refspec is passed as a parameter, it's the same as passing the most recent commit ID (head) for that branch.
2
-
3
-### 4.1 Commit history
4
-For a host that is freshly installed, there is only one commit in the history for the only branch.
5
-```
6
-root@photon-host [ ~ ]# ostree log photon/1.0/x86_64/minimal
7
-commit 56ef687f1319604b7900a232715718d26ca407de7e1dc89251b206f8e255dcb4
8
-Date:  2016-06-07 14:06:17 +0000
9
-Version: 1.0_minimal
10
-```
11
-This commit has no parent; if there was an older commit, it would have been listed too. We can get the same listing (either nicely formatted or raw variant data) by passing the Commit ID. Just the first several hex digits will suffice to identify the commit ID. We can either request to be displayed in a pretty format, or raw - the actual C struct.
12
-```
13
-root@photon-host [ ~ ]# ostree log 56ef
14
-commit 56ef687f1319604b7900a232715718d26ca407de7e1dc89251b206f8e255dcb4
15
-Date:  2016-06-07 14:06:17 +0000
16
-Version: 1.0_minimal
17
-```
18
-```
19
-root@photon-host [ ~ ]# ostree log 56ef --raw
20
-commit 56ef687f1319604b7900a232715718d26ca407de7e1dc89251b206f8e255dcb4
21
-({'version': <'1.0_minimal'>, 'rpmostree.inputhash': <'40ae75453cf7f00b163848676c4b5716511e7515b95fb7b9168004aa97f05dd9'>}, @ay [], @a(say) [], '', '', uint64 1465308377, [byte 0x3c, 0x6b, 0x71, 0x44, 0x07, 0xd0, 0x5e, 0xd5, 0x9d, 0xfc, 0x4a, 0x1c, 0x33, 0x74, 0x96, 0x1d, 0x50, 0xa3, 0x53, 0xd5, 0xf1, 0x20, 0xb4, 0x40, 0xd0, 0x60, 0x35, 0xf2, 0xf8, 0x29, 0xcf, 0x5f], [byte 0x44, 0x6a, 0x0e, 0xf1, 0x1b, 0x7c, 0xc1, 0x67, 0xf3, 0xb6, 0x03, 0xe5, 0x85, 0xc7, 0xee, 0xee, 0xb6, 0x75, 0xfa, 0xa4, 0x12, 0xd5, 0xec, 0x73, 0xf6, 0x29, 0x88, 0xeb, 0x0b, 0x6c, 0x54, 0x88])
22
-```
23
-
24
-### 4.2 Listing file mappings
25
-This command lists the file relations between the original source Linux Photon filetree and the deployed filetree. The normal columns include file type type (regular file, directory, link), permissions in chmod octal format, userID, groupID, file size, file name. 
26
-```
27
-root@photon-host [ ~ ]# ostree ls photon/1.0/x86_64/minimal
28
-d00755 0 0      0 /
29
-l00777 0 0      0 /bin -> usr/bin
30
-l00777 0 0      0 /home -> var/home
31
-l00777 0 0      0 /lib -> usr/lib
32
-l00777 0 0      0 /lib64 -> usr/lib
33
-l00777 0 0      0 /media -> run/media
34
-l00777 0 0      0 /mnt -> var/mnt
35
-l00777 0 0      0 /opt -> var/opt
36
-l00777 0 0      0 /ostree -> sysroot/ostree
37
-l00777 0 0      0 /root -> var/roothome
38
-l00777 0 0      0 /sbin -> usr/sbin
39
-l00777 0 0      0 /srv -> var/srv
40
-l00777 0 0      0 /tmp -> sysroot/tmp
41
-d00755 0 0      0 /boot
42
-d00755 0 0      0 /dev
43
-d00755 0 0      0 /proc
44
-d00755 0 0      0 /run
45
-d00755 0 0      0 /sys
46
-d00755 0 0      0 /sysroot
47
-d00755 0 0      0 /usr
48
-d00755 0 0      0 /var
49
-```
50
-Extra columns can be added like checksum (-C) and extended attributes (-X). 
51
-```
52
-root@photon-host [ /usr/share/man/man1 ]# ostree ls photon/1.0/x86_64/minimal -C
53
-d00755 0 0      0 3c6b714407d05ed59dfc4a1c3374961d50a353d5f120b440d06035f2f829cf5f 446a0ef11b7cc167f3b603e585c7eeeeb675faa412d5ec73f62988eb0b6c5488 /
54
-l00777 0 0      0 389846c2702216e1367c8dfb68326a6b93ccf5703c89c93979052a9bf359608e /bin -> usr/bin
55
-l00777 0 0      0 4344c10bf4931483f918496534f12ed9b50dc6a2cead35e3cd9dd898d6ac9414 /home -> var/home
56
-l00777 0 0      0 f11902ca9d69a80df33918534a3e443251fd0aa7f94b76301e1f55e52aed29dd /lib -> usr/lib
57
-l00777 0 0      0 f11902ca9d69a80df33918534a3e443251fd0aa7f94b76301e1f55e52aed29dd /lib64 -> usr/lib
58
-l00777 0 0      0 75317a3df11447c470ffdd63dde045450ca97dfb2a97a0f3f6a21a5da66f737c /media -> run/media
59
-l00777 0 0      0 97c55dbe24e8f3aecfd3f3e5b3f44646fccbb39799807d37a217e9c871da108b /mnt -> var/mnt
60
-l00777 0 0      0 46b1abbd27a846a9257a8d8c9fc4b384ac0888bdb8ac0d6a2d5de72715bd5092 /opt -> var/opt
61
-l00777 0 0      0 d37269e3f46023fd0275212473e07011894cdf4148cbf3fb5758a7e9471dad8e /ostree -> sysroot/ostree
62
-l00777 0 0      0 6f800e74eed172661278d1e1f09e389a6504dcd3358618e1c1618f91f9d33601 /root -> var/roothome
63
-l00777 0 0      0 e0bead7be9323b06bea05cb9b66eb151839989e3a4e5d1a93e09a36919e91818 /sbin -> usr/sbin
64
-l00777 0 0      0 5d4250bba1ed300f793fa9769474351ee5cebd71e8339078af7ebfbe6256d9b5 /srv -> var/srv
65
-l00777 0 0      0 364fbd62f91ca1e06eb7dbd50c93de8976f2cea633658e2dbe803ce6f7490c09 /tmp -> sysroot/tmp
66
-d00755 0 0      0 1e4f98d92b35c453d8f61e668aea9fae7ca1863f6609db787374b4ad5caf3b2f 446a0ef11b7cc167f3b603e585c7eeeeb675faa412d5ec73f62988eb0b6c5488 /boot
67
-d00755 0 0      0 6e340b9cffb37a989ca544e6bb780a2c78901d3fb33738768511a30617afa01d 446a0ef11b7cc167f3b603e585c7eeeeb675faa412d5ec73f62988eb0b6c5488 /dev
68
-d00755 0 0      0 6e340b9cffb37a989ca544e6bb780a2c78901d3fb33738768511a30617afa01d 446a0ef11b7cc167f3b603e585c7eeeeb675faa412d5ec73f62988eb0b6c5488 /proc
69
-d00755 0 0      0 6e340b9cffb37a989ca544e6bb780a2c78901d3fb33738768511a30617afa01d 446a0ef11b7cc167f3b603e585c7eeeeb675faa412d5ec73f62988eb0b6c5488 /run
70
-d00755 0 0      0 6e340b9cffb37a989ca544e6bb780a2c78901d3fb33738768511a30617afa01d 446a0ef11b7cc167f3b603e585c7eeeeb675faa412d5ec73f62988eb0b6c5488 /sys
71
-d00755 0 0      0 6e340b9cffb37a989ca544e6bb780a2c78901d3fb33738768511a30617afa01d 446a0ef11b7cc167f3b603e585c7eeeeb675faa412d5ec73f62988eb0b6c5488 /sysroot
72
-d00755 0 0      0 b072f4b3e995a491c04d88636401ca156e80f103b002d724ae76c07174ee4c74 446a0ef11b7cc167f3b603e585c7eeeeb675faa412d5ec73f62988eb0b6c5488 /usr
73
-d00755 0 0      0 6e340b9cffb37a989ca544e6bb780a2c78901d3fb33738768511a30617afa01d 446a0ef11b7cc167f3b603e585c7eeeeb675faa412d5ec73f62988eb0b6c5488 /var
74
-```
75
-
76
-By default, only the top folders are listed, but -R will list recursively. Instead of listing over 10,000 files, let's filter to just all files that contain 'rpm-ostree', 'rpmostree' or 'RpmOstree', that must belong to **rpm-ostree** package itself.
77
-```
78
-root@photon-host [ /usr/share/rpm-ostree ]# ostree ls photon/1.0/x86_64/minimal -R | grep -e '[Rr]pm-\?[Oo]stree'
79
-l00777 0 0      0 /usr/bin/atomic -> rpm-ostree
80
--00755 0 0 131104 /usr/bin/rpm-ostree
81
-l00777 0 0      0 /usr/lib/librpmostree-1.so.1 -> librpmostree-1.so.1.0.0
82
--00755 0 0 104272 /usr/lib/librpmostree-1.so.1.0.0
83
--00644 0 0   1296 /usr/lib/girepository-1.0/RpmOstree-1.0.typelib
84
-d00755 0 0      0 /usr/lib/rpm-ostree
85
--00644 0 0    622 /usr/lib/rpm-ostree/tmpfiles-ostree-integration.conf
86
--00644 0 0    717 /usr/lib/tmpfiles.d/rpm-ostree-autovar.conf
87
-d00755 0 0      0 /usr/share/rpm-ostree
88
--00644 0 0   1132 /usr/share/rpm-ostree/treefile.json
89
-```
90
-
91
-**atomic** is really an alias for rpm-ostree command. The last file **treefile.json** is not installed by the rpm-ostree package, it's actually downloaded from the server, as we will see in the next chapter. For now, let's notice **"osname" : "photon",  "ref" : "photon/1.0/x86_64/minimal",  "automatic_version_prefix" : "1.0_minimal"**, that matches what we've known so far, and also the **"documentation" : false** setting, that explains why there are no manual files installed for rpm-ostree, and in fact for any package.
92
-```
93
-root@photon-host [ /usr/share/rpm-ostree ]# ls -l /usr/share/man/man1 
94
-total 0
95
-```
96
-
97
-
98
-### 4.3 Listing configuration changes
99
-
100
-To diff the current /etc configuration versus default /etc (from the base image), this command will show the **M**odified, **A**dded and **D**eleted files:
101
-```
102
-root@photon-host [ ~ ]# ostree admin config-diff
103
-M    mtab
104
-M    ssh/sshd_config
105
-M    shadow
106
-M    hosts
107
-M    fstab
108
-M    machine-id
109
-A    ssh/ssh_host_rsa_key
110
-A    ssh/ssh_host_rsa_key.pub
111
-A    ssh/ssh_host_dsa_key
112
-A    ssh/ssh_host_dsa_key.pub
113
-A    ssh/ssh_host_ecdsa_key
114
-A    ssh/ssh_host_ecdsa_key.pub
115
-A    ssh/ssh_host_ed25519_key
116
-A    ssh/ssh_host_ed25519_key.pub
117
-A    ssh/sshd.pid
118
-A    tmpfiles.d/postinstall.sh
119
-A    udev/hwdb.bin
120
-A    resolv.conf
121
-A    hostname
122
-A    postinstall
123
-A    localtime
124
-A    .updated
125
-```
126
-
127
-### 4.4 Listing packages
128
-As expected, there is an rpm-ostree command that lists all the packages for that branch, extracted from RPM database.   
129
-```
130
-root@photon-host [ ~ ]# rpm-ostree db list photon/1.0/x86_64/minimal
131
-ostree commit: photon/1.0/x86_64/minimal (56ef687f1319604b7900a232715718d26ca407de7e1dc89251b206f8e255dcb4)
132
- Linux-PAM-1.2.1-3.ph1.x86_64
133
- attr-2.4.47-3.ph1.x86_64
134
- autogen-libopts-5.18.7-2.ph1.x86_64
135
- bash-4.3.30-4.ph1.x86_64
136
- bc-1.06.95-3.ph1.x86_64
137
- binutils-2.25.1-2.ph1.x86_64
138
- bridge-utils-1.5-2.ph1.x86_64
139
- bzip2-1.0.6-5.ph1.x86_64
140
- ca-certificates-20160109-5.ph1.x86_64
141
- coreutils-8.25-2.ph1.x86_64
142
- cpio-2.12-2.ph1.x86_64
143
- cracklib-2.9.6-2.ph1.x86_64
144
- cracklib-dicts-2.9.6-2.ph1.x86_64
145
- curl-7.47.1-2.ph1.x86_64
146
- db-6.1.26-2.ph1.x86_64
147
- dbus-1.8.8-5.ph1.x86_64
148
- device-mapper-2.02.141-5.ph1.x86_64
149
- device-mapper-libs-2.02.141-5.ph1.x86_64
150
- docker-1.11.0-5.ph1.x86_64
151
- dracut-044-3.ph1.x86_64
152
- dracut-tools-044-3.ph1.x86_64
153
- e2fsprogs-1.42.13-2.ph1.x86_64
154
- elfutils-libelf-0.165-2.ph1.x86_64
155
- expat-2.1.0-2.ph1.x86_64
156
- file-5.24-2.ph1.x86_64
157
- filesystem-1.0-7.ph1.x86_64
158
- findutils-4.6.0-2.ph1.x86_64
159
- flex-2.5.39-2.ph1.x86_64
160
- gdbm-1.11-2.ph1.x86_64
161
- glib-2.47.6-2.ph1.x86_64
162
- glib-networking-2.46.1-2.ph1.x86_64
163
- glibc-2.22-8.ph1.x86_64
164
- gmp-6.0.0a-3.ph1.x86_64
165
- gnutls-3.4.11-2.ph1.x86_64
166
- gobject-introspection-1.46.0-2.ph1.x86_64
167
- gpgme-1.6.0-2.ph1.x86_64
168
- grep-2.21-2.ph1.x86_64
169
- grub2-2.02-4.ph1.x86_64
170
- gzip-1.6-2.ph1.x86_64
171
- hawkey-2014.1-4.ph1.x86_64
172
- iana-etc-2.30-2.ph1.noarch
173
- iproute2-4.2.0-2.ph1.x86_64
174
- iptables-1.6.0-4.ph1.x86_64
175
- iputils-20151218-3.ph1.x86_64
176
- json-glib-1.0.4-2.ph1.x86_64
177
- kmod-21-4.ph1.x86_64
178
- krb5-1.14-4.ph1.x86_64
179
- libarchive-3.1.2-6.ph1.x86_64
180
- libassuan-2.4.2-2.ph1.x86_64
181
- libcap-2.25-2.ph1.x86_64
182
- libffi-3.2.1-2.ph1.x86_64
183
- libgcc-5.3.0-3.ph1.x86_64
184
- libgcrypt-1.6.5-2.ph1.x86_64
185
- libgomp-5.3.0-3.ph1.x86_64
186
- libgpg-error-1.21-2.ph1.x86_64
187
- libgsystem-2015.1-2.ph1.x86_64
188
- libhif-0.2.2-2.ph1.x86_64
189
- librepo-1.7.17-2.ph1.x86_64
190
- libselinux-2.5-2.ph1.x86_64
191
- libsepol-2.5-2.ph1.x86_64
192
- libsolv-0.6.19-2.ph1.x86_64
193
- libsoup-2.53.90-2.ph1.x86_64
194
- libstdc++-5.3.0-3.ph1.x86_64
195
- libtasn1-4.7-2.ph1.x86_64
196
- libtool-2.4.6-2.ph1.x86_64
197
- libxml2-2.9.4-1.ph1.x86_64
198
- linux-4.4.8-6.ph1.x86_64
199
- lua-5.3.2-2.ph1.x86_64
200
- m4-1.4.17-2.ph1.x86_64
201
- mkinitcpio-19-2.ph1.x86_64
202
- mpfr-3.1.3-2.ph1.x86_64
203
- ncurses-6.0-2.ph1.x86_64
204
- net-tools-1.60-7.ph1.x86_64
205
- nettle-3.2-2.ph1.x86_64
206
- nspr-4.12-2.ph1.x86_64
207
- nss-3.21-2.ph1.x86_64
208
- nss-altfiles-2.19.1-2.ph1.x86_64
209
- openssh-7.1p2-3.ph1.x86_64
210
- openssl-1.0.2h-2.ph1.x86_64
211
- ostree-2015.7-5.ph1.x86_64
212
- pcre-8.38-3.ph1.x86_64
213
- photon-release-1.0-5.ph1.noarch
214
- pkg-config-0.28-2.ph1.x86_64
215
- popt-1.16-2.ph1.x86_64
216
- procps-ng-3.3.11-2.ph1.x86_64
217
- python2-2.7.11-4.ph1.x86_64
218
- python2-libs-2.7.11-4.ph1.x86_64
219
- readline-6.3-4.ph1.x86_64
220
- rpm-4.11.2-10.ph1.x86_64
221
- rpm-ostree-2015.7-2.ph1.x86_64
222
- sed-4.2.2-2.ph1.x86_64
223
- shadow-4.2.1-7.ph1.x86_64
224
- sqlite-autoconf-3.11.0-2.ph1.x86_64
225
- systemd-228-21.ph1.x86_64
226
- tcsh-6.19.00-4.ph1.x86_64
227
- util-linux-2.27.1-2.ph1.x86_64
228
- vim-7.4-5.ph1.x86_64
229
- which-2.21-2.ph1.x86_64
230
- xz-5.2.2-2.ph1.x86_64
231
- zlib-1.2.8-3.ph1.x86_64
232
-```
233
-
234
-### 4.5 Querying for package details
235
-We are able to use the query option of rpm to make sure any package have been installed properly. The files list should match the previous file mappings in 4.2, so let's check package **rpm-ostree**. As we've seen, manual files listed here are actually missing, they were not installed.
236
-```
237
-root@photon-host [ /usr/share/man/man1 ]# rpm -ql  rpm-ostree
238
-/usr/bin/atomic
239
-/usr/bin/rpm-ostree
240
-/usr/lib/girepository-1.0/RpmOstree-1.0.typelib
241
-/usr/lib/librpmostree-1.so.1
242
-/usr/lib/librpmostree-1.so.1.0.0
243
-/usr/lib/rpm-ostree
244
-/usr/lib/rpm-ostree/tmpfiles-ostree-integration.conf
245
-/usr/share/man/man1/atomic.1.gz
246
-/usr/share/man/man1/rpm-ostree.1.gz
247
-```
248
-### 4.6 Why am I unable to install, update or delete packages?
249
-
250
-All the commands executed so far operated in read-only mode. But what if you want to erase or install a package using our old friend rpm?
251
-The RPM database is not writable any longer and the file system itself is read-only (except for /var and /etc directories). The idea is that preparing the packages should be done via server tree composition and deployment at host should bring them installed into a new bootable tree that is read-only, recorded into the read-only RPM database. This will insure that all systems deployed are brought into a predictable state and no one could mess with them.
252
-In fact, tdnf and yum commands are not even available to install new packages at the host. Even if you bring them over, adding a new package via **tdnf install** will return an error.
253
-But don't get sad. Installing, updating and deleting files & packages the RPM-OSTree way - from the server - that's exactly the topic of next chapters.
254
-
255
-[[Back to main page|Photon-RPM-OSTree:-a-simple-guide]] | [[Previous page|Photon-RPM-OStree:-3-Concepts-in-action]]  | [[Next page >|Photon-RPM-OSTree:-5-Host-updating-operations]] 
256
-
257 1
new file mode 100644
... ...
@@ -0,0 +1,256 @@
0
+# Querying For Commit File and Package Metadata
1
+
2
+There are several ostree and rpm-ostree commands that list file or package data based on either the Commit ID, or Refspec. If Refspec is passed as a parameter, it's the same as passing the most recent commit ID (head) for that branch.
3
+
4
+## 4.1 Commit history
5
+For a host that is freshly installed, there is only one commit in the history for the only branch.
6
+```
7
+root@photon-host [ ~ ]# ostree log photon/1.0/x86_64/minimal
8
+commit 56ef687f1319604b7900a232715718d26ca407de7e1dc89251b206f8e255dcb4
9
+Date:  2016-06-07 14:06:17 +0000
10
+Version: 1.0_minimal
11
+```
12
+This commit has no parent; if there was an older commit, it would have been listed too. We can get the same listing (either nicely formatted or raw variant data) by passing the Commit ID. Just the first several hex digits will suffice to identify the commit ID. We can either request to be displayed in a pretty format, or raw - the actual C struct.
13
+```
14
+root@photon-host [ ~ ]# ostree log 56ef
15
+commit 56ef687f1319604b7900a232715718d26ca407de7e1dc89251b206f8e255dcb4
16
+Date:  2016-06-07 14:06:17 +0000
17
+Version: 1.0_minimal
18
+```
19
+```
20
+root@photon-host [ ~ ]# ostree log 56ef --raw
21
+commit 56ef687f1319604b7900a232715718d26ca407de7e1dc89251b206f8e255dcb4
22
+({'version': <'1.0_minimal'>, 'rpmostree.inputhash': <'40ae75453cf7f00b163848676c4b5716511e7515b95fb7b9168004aa97f05dd9'>}, @ay [], @a(say) [], '', '', uint64 1465308377, [byte 0x3c, 0x6b, 0x71, 0x44, 0x07, 0xd0, 0x5e, 0xd5, 0x9d, 0xfc, 0x4a, 0x1c, 0x33, 0x74, 0x96, 0x1d, 0x50, 0xa3, 0x53, 0xd5, 0xf1, 0x20, 0xb4, 0x40, 0xd0, 0x60, 0x35, 0xf2, 0xf8, 0x29, 0xcf, 0x5f], [byte 0x44, 0x6a, 0x0e, 0xf1, 0x1b, 0x7c, 0xc1, 0x67, 0xf3, 0xb6, 0x03, 0xe5, 0x85, 0xc7, 0xee, 0xee, 0xb6, 0x75, 0xfa, 0xa4, 0x12, 0xd5, 0xec, 0x73, 0xf6, 0x29, 0x88, 0xeb, 0x0b, 0x6c, 0x54, 0x88])
23
+```
24
+
25
+## 4.2 Listing file mappings
26
+This command lists the file relations between the original source Linux Photon filetree and the deployed filetree. The normal columns include file type type (regular file, directory, link), permissions in chmod octal format, userID, groupID, file size, file name. 
27
+```
28
+root@photon-host [ ~ ]# ostree ls photon/1.0/x86_64/minimal
29
+d00755 0 0      0 /
30
+l00777 0 0      0 /bin -> usr/bin
31
+l00777 0 0      0 /home -> var/home
32
+l00777 0 0      0 /lib -> usr/lib
33
+l00777 0 0      0 /lib64 -> usr/lib
34
+l00777 0 0      0 /media -> run/media
35
+l00777 0 0      0 /mnt -> var/mnt
36
+l00777 0 0      0 /opt -> var/opt
37
+l00777 0 0      0 /ostree -> sysroot/ostree
38
+l00777 0 0      0 /root -> var/roothome
39
+l00777 0 0      0 /sbin -> usr/sbin
40
+l00777 0 0      0 /srv -> var/srv
41
+l00777 0 0      0 /tmp -> sysroot/tmp
42
+d00755 0 0      0 /boot
43
+d00755 0 0      0 /dev
44
+d00755 0 0      0 /proc
45
+d00755 0 0      0 /run
46
+d00755 0 0      0 /sys
47
+d00755 0 0      0 /sysroot
48
+d00755 0 0      0 /usr
49
+d00755 0 0      0 /var
50
+```
51
+Extra columns can be added like checksum (-C) and extended attributes (-X). 
52
+```
53
+root@photon-host [ /usr/share/man/man1 ]# ostree ls photon/1.0/x86_64/minimal -C
54
+d00755 0 0      0 3c6b714407d05ed59dfc4a1c3374961d50a353d5f120b440d06035f2f829cf5f 446a0ef11b7cc167f3b603e585c7eeeeb675faa412d5ec73f62988eb0b6c5488 /
55
+l00777 0 0      0 389846c2702216e1367c8dfb68326a6b93ccf5703c89c93979052a9bf359608e /bin -> usr/bin
56
+l00777 0 0      0 4344c10bf4931483f918496534f12ed9b50dc6a2cead35e3cd9dd898d6ac9414 /home -> var/home
57
+l00777 0 0      0 f11902ca9d69a80df33918534a3e443251fd0aa7f94b76301e1f55e52aed29dd /lib -> usr/lib
58
+l00777 0 0      0 f11902ca9d69a80df33918534a3e443251fd0aa7f94b76301e1f55e52aed29dd /lib64 -> usr/lib
59
+l00777 0 0      0 75317a3df11447c470ffdd63dde045450ca97dfb2a97a0f3f6a21a5da66f737c /media -> run/media
60
+l00777 0 0      0 97c55dbe24e8f3aecfd3f3e5b3f44646fccbb39799807d37a217e9c871da108b /mnt -> var/mnt
61
+l00777 0 0      0 46b1abbd27a846a9257a8d8c9fc4b384ac0888bdb8ac0d6a2d5de72715bd5092 /opt -> var/opt
62
+l00777 0 0      0 d37269e3f46023fd0275212473e07011894cdf4148cbf3fb5758a7e9471dad8e /ostree -> sysroot/ostree
63
+l00777 0 0      0 6f800e74eed172661278d1e1f09e389a6504dcd3358618e1c1618f91f9d33601 /root -> var/roothome
64
+l00777 0 0      0 e0bead7be9323b06bea05cb9b66eb151839989e3a4e5d1a93e09a36919e91818 /sbin -> usr/sbin
65
+l00777 0 0      0 5d4250bba1ed300f793fa9769474351ee5cebd71e8339078af7ebfbe6256d9b5 /srv -> var/srv
66
+l00777 0 0      0 364fbd62f91ca1e06eb7dbd50c93de8976f2cea633658e2dbe803ce6f7490c09 /tmp -> sysroot/tmp
67
+d00755 0 0      0 1e4f98d92b35c453d8f61e668aea9fae7ca1863f6609db787374b4ad5caf3b2f 446a0ef11b7cc167f3b603e585c7eeeeb675faa412d5ec73f62988eb0b6c5488 /boot
68
+d00755 0 0      0 6e340b9cffb37a989ca544e6bb780a2c78901d3fb33738768511a30617afa01d 446a0ef11b7cc167f3b603e585c7eeeeb675faa412d5ec73f62988eb0b6c5488 /dev
69
+d00755 0 0      0 6e340b9cffb37a989ca544e6bb780a2c78901d3fb33738768511a30617afa01d 446a0ef11b7cc167f3b603e585c7eeeeb675faa412d5ec73f62988eb0b6c5488 /proc
70
+d00755 0 0      0 6e340b9cffb37a989ca544e6bb780a2c78901d3fb33738768511a30617afa01d 446a0ef11b7cc167f3b603e585c7eeeeb675faa412d5ec73f62988eb0b6c5488 /run
71
+d00755 0 0      0 6e340b9cffb37a989ca544e6bb780a2c78901d3fb33738768511a30617afa01d 446a0ef11b7cc167f3b603e585c7eeeeb675faa412d5ec73f62988eb0b6c5488 /sys
72
+d00755 0 0      0 6e340b9cffb37a989ca544e6bb780a2c78901d3fb33738768511a30617afa01d 446a0ef11b7cc167f3b603e585c7eeeeb675faa412d5ec73f62988eb0b6c5488 /sysroot
73
+d00755 0 0      0 b072f4b3e995a491c04d88636401ca156e80f103b002d724ae76c07174ee4c74 446a0ef11b7cc167f3b603e585c7eeeeb675faa412d5ec73f62988eb0b6c5488 /usr
74
+d00755 0 0      0 6e340b9cffb37a989ca544e6bb780a2c78901d3fb33738768511a30617afa01d 446a0ef11b7cc167f3b603e585c7eeeeb675faa412d5ec73f62988eb0b6c5488 /var
75
+```
76
+
77
+By default, only the top folders are listed, but -R will list recursively. Instead of listing over 10,000 files, let's filter to just all files that contain 'rpm-ostree', 'rpmostree' or 'RpmOstree', that must belong to **rpm-ostree** package itself.
78
+```
79
+root@photon-host [ /usr/share/rpm-ostree ]# ostree ls photon/1.0/x86_64/minimal -R | grep -e '[Rr]pm-\?[Oo]stree'
80
+l00777 0 0      0 /usr/bin/atomic -> rpm-ostree
81
+-00755 0 0 131104 /usr/bin/rpm-ostree
82
+l00777 0 0      0 /usr/lib/librpmostree-1.so.1 -> librpmostree-1.so.1.0.0
83
+-00755 0 0 104272 /usr/lib/librpmostree-1.so.1.0.0
84
+-00644 0 0   1296 /usr/lib/girepository-1.0/RpmOstree-1.0.typelib
85
+d00755 0 0      0 /usr/lib/rpm-ostree
86
+-00644 0 0    622 /usr/lib/rpm-ostree/tmpfiles-ostree-integration.conf
87
+-00644 0 0    717 /usr/lib/tmpfiles.d/rpm-ostree-autovar.conf
88
+d00755 0 0      0 /usr/share/rpm-ostree
89
+-00644 0 0   1132 /usr/share/rpm-ostree/treefile.json
90
+```
91
+
92
+**atomic** is really an alias for rpm-ostree command. The last file **treefile.json** is not installed by the rpm-ostree package, it's actually downloaded from the server, as we will see in the next chapter. For now, let's notice **"osname" : "photon",  "ref" : "photon/1.0/x86_64/minimal",  "automatic_version_prefix" : "1.0_minimal"**, that matches what we've known so far, and also the **"documentation" : false** setting, that explains why there are no manual files installed for rpm-ostree, and in fact for any package.
93
+```
94
+root@photon-host [ /usr/share/rpm-ostree ]# ls -l /usr/share/man/man1 
95
+total 0
96
+```
97
+
98
+
99
+## 4.3 Listing configuration changes
100
+
101
+To diff the current /etc configuration versus default /etc (from the base image), this command will show the **M**odified, **A**dded and **D**eleted files:
102
+```
103
+root@photon-host [ ~ ]# ostree admin config-diff
104
+M    mtab
105
+M    ssh/sshd_config
106
+M    shadow
107
+M    hosts
108
+M    fstab
109
+M    machine-id
110
+A    ssh/ssh_host_rsa_key
111
+A    ssh/ssh_host_rsa_key.pub
112
+A    ssh/ssh_host_dsa_key
113
+A    ssh/ssh_host_dsa_key.pub
114
+A    ssh/ssh_host_ecdsa_key
115
+A    ssh/ssh_host_ecdsa_key.pub
116
+A    ssh/ssh_host_ed25519_key
117
+A    ssh/ssh_host_ed25519_key.pub
118
+A    ssh/sshd.pid
119
+A    tmpfiles.d/postinstall.sh
120
+A    udev/hwdb.bin
121
+A    resolv.conf
122
+A    hostname
123
+A    postinstall
124
+A    localtime
125
+A    .updated
126
+```
127
+
128
+## 4.4 Listing packages
129
+As expected, there is an rpm-ostree command that lists all the packages for that branch, extracted from RPM database.   
130
+```
131
+root@photon-host [ ~ ]# rpm-ostree db list photon/1.0/x86_64/minimal
132
+ostree commit: photon/1.0/x86_64/minimal (56ef687f1319604b7900a232715718d26ca407de7e1dc89251b206f8e255dcb4)
133
+ Linux-PAM-1.2.1-3.ph1.x86_64
134
+ attr-2.4.47-3.ph1.x86_64
135
+ autogen-libopts-5.18.7-2.ph1.x86_64
136
+ bash-4.3.30-4.ph1.x86_64
137
+ bc-1.06.95-3.ph1.x86_64
138
+ binutils-2.25.1-2.ph1.x86_64
139
+ bridge-utils-1.5-2.ph1.x86_64
140
+ bzip2-1.0.6-5.ph1.x86_64
141
+ ca-certificates-20160109-5.ph1.x86_64
142
+ coreutils-8.25-2.ph1.x86_64
143
+ cpio-2.12-2.ph1.x86_64
144
+ cracklib-2.9.6-2.ph1.x86_64
145
+ cracklib-dicts-2.9.6-2.ph1.x86_64
146
+ curl-7.47.1-2.ph1.x86_64
147
+ db-6.1.26-2.ph1.x86_64
148
+ dbus-1.8.8-5.ph1.x86_64
149
+ device-mapper-2.02.141-5.ph1.x86_64
150
+ device-mapper-libs-2.02.141-5.ph1.x86_64
151
+ docker-1.11.0-5.ph1.x86_64
152
+ dracut-044-3.ph1.x86_64
153
+ dracut-tools-044-3.ph1.x86_64
154
+ e2fsprogs-1.42.13-2.ph1.x86_64
155
+ elfutils-libelf-0.165-2.ph1.x86_64
156
+ expat-2.1.0-2.ph1.x86_64
157
+ file-5.24-2.ph1.x86_64
158
+ filesystem-1.0-7.ph1.x86_64
159
+ findutils-4.6.0-2.ph1.x86_64
160
+ flex-2.5.39-2.ph1.x86_64
161
+ gdbm-1.11-2.ph1.x86_64
162
+ glib-2.47.6-2.ph1.x86_64
163
+ glib-networking-2.46.1-2.ph1.x86_64
164
+ glibc-2.22-8.ph1.x86_64
165
+ gmp-6.0.0a-3.ph1.x86_64
166
+ gnutls-3.4.11-2.ph1.x86_64
167
+ gobject-introspection-1.46.0-2.ph1.x86_64
168
+ gpgme-1.6.0-2.ph1.x86_64
169
+ grep-2.21-2.ph1.x86_64
170
+ grub2-2.02-4.ph1.x86_64
171
+ gzip-1.6-2.ph1.x86_64
172
+ hawkey-2014.1-4.ph1.x86_64
173
+ iana-etc-2.30-2.ph1.noarch
174
+ iproute2-4.2.0-2.ph1.x86_64
175
+ iptables-1.6.0-4.ph1.x86_64
176
+ iputils-20151218-3.ph1.x86_64
177
+ json-glib-1.0.4-2.ph1.x86_64
178
+ kmod-21-4.ph1.x86_64
179
+ krb5-1.14-4.ph1.x86_64
180
+ libarchive-3.1.2-6.ph1.x86_64
181
+ libassuan-2.4.2-2.ph1.x86_64
182
+ libcap-2.25-2.ph1.x86_64
183
+ libffi-3.2.1-2.ph1.x86_64
184
+ libgcc-5.3.0-3.ph1.x86_64
185
+ libgcrypt-1.6.5-2.ph1.x86_64
186
+ libgomp-5.3.0-3.ph1.x86_64
187
+ libgpg-error-1.21-2.ph1.x86_64
188
+ libgsystem-2015.1-2.ph1.x86_64
189
+ libhif-0.2.2-2.ph1.x86_64
190
+ librepo-1.7.17-2.ph1.x86_64
191
+ libselinux-2.5-2.ph1.x86_64
192
+ libsepol-2.5-2.ph1.x86_64
193
+ libsolv-0.6.19-2.ph1.x86_64
194
+ libsoup-2.53.90-2.ph1.x86_64
195
+ libstdc++-5.3.0-3.ph1.x86_64
196
+ libtasn1-4.7-2.ph1.x86_64
197
+ libtool-2.4.6-2.ph1.x86_64
198
+ libxml2-2.9.4-1.ph1.x86_64
199
+ linux-4.4.8-6.ph1.x86_64
200
+ lua-5.3.2-2.ph1.x86_64
201
+ m4-1.4.17-2.ph1.x86_64
202
+ mkinitcpio-19-2.ph1.x86_64
203
+ mpfr-3.1.3-2.ph1.x86_64
204
+ ncurses-6.0-2.ph1.x86_64
205
+ net-tools-1.60-7.ph1.x86_64
206
+ nettle-3.2-2.ph1.x86_64
207
+ nspr-4.12-2.ph1.x86_64
208
+ nss-3.21-2.ph1.x86_64
209
+ nss-altfiles-2.19.1-2.ph1.x86_64
210
+ openssh-7.1p2-3.ph1.x86_64
211
+ openssl-1.0.2h-2.ph1.x86_64
212
+ ostree-2015.7-5.ph1.x86_64
213
+ pcre-8.38-3.ph1.x86_64
214
+ photon-release-1.0-5.ph1.noarch
215
+ pkg-config-0.28-2.ph1.x86_64
216
+ popt-1.16-2.ph1.x86_64
217
+ procps-ng-3.3.11-2.ph1.x86_64
218
+ python2-2.7.11-4.ph1.x86_64
219
+ python2-libs-2.7.11-4.ph1.x86_64
220
+ readline-6.3-4.ph1.x86_64
221
+ rpm-4.11.2-10.ph1.x86_64
222
+ rpm-ostree-2015.7-2.ph1.x86_64
223
+ sed-4.2.2-2.ph1.x86_64
224
+ shadow-4.2.1-7.ph1.x86_64
225
+ sqlite-autoconf-3.11.0-2.ph1.x86_64
226
+ systemd-228-21.ph1.x86_64
227
+ tcsh-6.19.00-4.ph1.x86_64
228
+ util-linux-2.27.1-2.ph1.x86_64
229
+ vim-7.4-5.ph1.x86_64
230
+ which-2.21-2.ph1.x86_64
231
+ xz-5.2.2-2.ph1.x86_64
232
+ zlib-1.2.8-3.ph1.x86_64
233
+```
234
+
235
+## 4.5 Querying for package details
236
+We are able to use the query option of rpm to make sure any package have been installed properly. The files list should match the previous file mappings in 4.2, so let's check package **rpm-ostree**. As we've seen, manual files listed here are actually missing, they were not installed.
237
+```
238
+root@photon-host [ /usr/share/man/man1 ]# rpm -ql  rpm-ostree
239
+/usr/bin/atomic
240
+/usr/bin/rpm-ostree
241
+/usr/lib/girepository-1.0/RpmOstree-1.0.typelib
242
+/usr/lib/librpmostree-1.so.1
243
+/usr/lib/librpmostree-1.so.1.0.0
244
+/usr/lib/rpm-ostree
245
+/usr/lib/rpm-ostree/tmpfiles-ostree-integration.conf
246
+/usr/share/man/man1/atomic.1.gz
247
+/usr/share/man/man1/rpm-ostree.1.gz
248
+```
249
+## 4.6 Why am I unable to install, update or delete packages?
250
+
251
+All the commands executed so far operated in read-only mode. But what if you want to erase or install a package using our old friend rpm?
252
+The RPM database is not writable any longer and the file system itself is read-only (except for /var and /etc directories). The idea is that preparing the packages should be done via server tree composition and deployment at host should bring them installed into a new bootable tree that is read-only, recorded into the read-only RPM database. This will insure that all systems deployed are brought into a predictable state and no one could mess with them.
253
+In fact, tdnf and yum commands are not even available to install new packages at the host. Even if you bring them over, adding a new package via **tdnf install** will return an error.
254
+But don't get sad. Installing, updating and deleting files & packages the RPM-OSTree way - from the server - that's exactly the topic of next chapters.
255
+
... ...
@@ -1,4 +1,6 @@
1
-### 5.1 Is it an update or an upgrade?
1
+# Host Updating Operations 
2
+
3
+## 5.1 Is it an update or an upgrade?
2 4
 If you've used yum, dnf (and now tdnf for Photon) in RPM systems or apt-get in Debian based Unix, you understand what "install" is for packages and the subtle difference between "update" and "upgrade".
3 5
 
4 6
 OSTree and RPM-OSTree don't distringuish between them and the term "upgrade" has a slightly different meaning - to bring the system in sync with the remote repo, to the top of the Refspec (branch), just like in Git, by pulling the latest changes.
... ...
@@ -10,7 +12,7 @@ The reverse operation of an upgrade is a "rollback" and fortunately it's not nam
10 10
 As we'll see in a future chapter, a jump to a different Refspec (branch) is also supported and it's named "rebase".
11 11
 
12 12
 
13
-### 5.2 Incremental upgrade
13
+## 5.2 Incremental upgrade
14 14
 To check if there are any updates available, one would execute:
15 15
 ```
16 16
 root@photon-host-def [ ~ ]# rpm-ostree upgrade
... ...
@@ -95,7 +97,7 @@ root@photon-host-def [ ~ ]# ostree admin config-diff --print-current-dir
95 95
 ```
96 96
 A fresh upgrade for a new version will delete the older, original image and bring a new one, that will become the new default image. The previous 'default' image will move down one position as the backup image.
97 97
 
98
-### 5.3 Listing file differences   
98
+## 5.3 Listing file differences   
99 99
 Now we can look at what files have been **A**dded, **M**odified, **D**eleted due to the addition of those three packages and switching of the boot directories, by comparing the two commits.
100 100
 ```
101 101
 root@photon-host-def [ ~ ]# ostree diff 2940 82bc
... ...
@@ -343,7 +345,7 @@ A    /usr/share/awk/walkarray.awk
343 343
 A    /usr/share/awk/zerofile.awk
344 344
 ```
345 345
  
346
-### 5.4 Listing package differences
346
+## 5.4 Listing package differences
347 347
 We can also look at package differences, as you expect, using the right tool for the job.
348 348
 ```
349 349
 root@photon-host-def [ ~ ]# rpm-ostree db diff 2940 82bc    
... ...
@@ -355,7 +357,7 @@ Added:
355 355
  wget-1.15-1.ph1.x86_64
356 356
 ```
357 357
 
358
-### 5.5 Rollback
358
+## 5.5 Rollback
359 359
 If we want to go back to the previous image, we can rollback. The order of the images will be changed, so the old filetree will become the default bootable image. If -r option is passed, the rollback will continue with a reboot.
360 360
 ```
361 361
 root@photon-host-def [ ~ ]# rpm-ostree rollback
... ...
@@ -384,7 +386,7 @@ root@photon-host-def [ ~ ]# ostree admin config-diff --print-current-dir
384 384
 /ostree/deploy/photon/deploy/2940e10c4d90ce6da572cbaeeff7b511cab4a64c280bd5969333dd2fca57cfa8.0 
385 385
 ```
386 386
 
387
-### 5.6 Deleting a deployed filetree
387
+## 5.6 Deleting a deployed filetree
388 388
 It is possible to delete a deployed tree. You won't need to do that normally, as upgrading to a new image will delete the old one, but if for some reason deploying failed (loss of power, networking issues), you'll want to delete the partially deployed image.  
389 389
 The only supported index is 1. (If multiple bootable images will be supported in the future, a larger than one, zero-based index of the image to delete will be supported).  
390 390
 You cannot delete the default bootable filetree, so passing 0 will result in an error.  
... ...
@@ -434,7 +436,7 @@ Updating from: photon:photon/1.0/x86_64/minimal
434 434
 +wget-1.15-1.ph1.x86_64
435 435
 ```
436 436
 
437
-### 5.7 Version skipping upgrade
437
+## 5.7 Version skipping upgrade
438 438
 
439 439
 Let's assume that after a while, VMware releases version 2 that removes **sudo** and adds **bison** and **tar**. Now, an upgrade will skip version 1 and go directly to 2. Let's first look at what packages are pulled (notice sudo missing, as expected), then upgrade with reboot option.
440 440
 ```
... ...
@@ -479,7 +481,7 @@ error: Refspec '82bc' not found
479 479
 ```
480 480
 Interesting fact: The metadata for commit 82bc has been removed from the local repo!  
481 481
 
482
-### 5.8 Tracking parent commits
482
+## 5.8 Tracking parent commits
483 483
 OSTree will display limited commit history - maximum 2 levels, so if you want to traverse the history even though it may not find a commitment by its ID, you can refer to its parent using '^' suffix, grandfather via '^^' and so on. We know that 82bc is the parent of 092e:
484 484
 ```
485 485
 root@photon-host-def [ ~ ]# rpm-ostree db diff  092e^ 092e
... ...
@@ -490,7 +492,7 @@ error: No such metadata object 82bca728eadb7292d568404484ad6889c3f6303600ca8c743
490 490
 ````
491 491
 So commit 092e knows who its parent is, but its metadata is no longer in the local repo, so it cannot traverse further to its parent to find an existing grandfather.
492 492
 
493
-### 5.9 Resetting a branch to a previous commit
493
+## 5.9 Resetting a branch to a previous commit
494 494
 We can reset the head of a branch in a local repo to a previous commit, for example corresponding to version 0 (1.0_minimal).
495 495
 ```
496 496
 root@photon-host-def [ ~ ]# ostree reset photon:photon/1.0/x86_64/minimal 2940
... ...
@@ -1,16 +1,18 @@
1
+# Installing a server
2
+
1 3
 This is the server that is going to be used by a system administrator or a package installer developer to compose filesystem trees and make them available to hosts (or clients) to pull (download) and deploy.  
2 4
 
3 5
 The first step is to download the ISO for the desired release, if you have not done that already:  
4
-[[Photon 1.0 GA ISO file|https://bintray.com/artifact/download/vmware/photon/photon-1.0-13c08b6.iso]]  
5
-[[Photon 1.0 Rev2 ISO file|https://bintray.com/artifact/download/vmware/photon/photon-1.0-62c543d.iso]]  
6
-[[Photon OS 2.0 Beta ISO file|https://bintray.com/vmware/photon/download_file?file_path=2.0%2FBeta%2Fiso%2Fphoton-2.0-8553d58.iso]]  
6
+[Photon 1.0 GA ISO file](https://bintray.com/artifact/download/vmware/photon/photon-1.0-13c08b6.iso)  
7
+[Photon 1.0 Rev2 ISO file](https://bintray.com/artifact/download/vmware/photon/photon-1.0-62c543d.iso)  
8
+[Photon OS 2.0 Beta ISO file](https://bintray.com/vmware/photon/download_file?file_path=2.0%2FBeta%2Fiso%2Fphoton-2.0-8553d58.iso)  
7 9
 
8 10
 Installation steps are the same to all Photon OS versions, except that under the hood:
9 11
 * Photon 1.0 sets up a 'minimal' sample file tree, so it's ready to accept host pull/install requests right away.
10 12
 * Photon 2.0 does not set up a file tree, so there are several steps needed post-install to have a completely functional server that host can deploy from; they will be explained in detail in Chapter 8 and 9, but a quick setup is provided for you later in this chapter.  
11 13
 
12
-### 6.1 Manual install of a server
13
-First, create a new VM in Fusion, Workstation or ESXi box, and go through the [[steps common to all installation profiles|Running-Project-Photon-on-Fusion]], then select the "Photon OSTree Server" option.
14
+## 6.1 Manual install of a server
15
+First, create a new VM in Fusion, Workstation or ESXi box, and go through the [steps common to all installation profiles](Running-Project-Photon-on-Fusion), then select the "Photon OSTree Server" option.
14 16
 
15 17
 ![PhotonChooseServer](https://cloud.githubusercontent.com/assets/13158414/14802949/1c5f92b8-0b0a-11e6-8d69-96e62218dfcb.png)
16 18
 
... ...
@@ -26,23 +28,22 @@ In order for hosts to access server's OSTree repo via http, an Apache web server
26 26
 The server's IP address will be passed to the Photon RPM-OSTree hosts that want to connect to this server.  
27 27
 You may ask your network administrator for a static IP, registered to your company's DNS, so your users who install Photon RPM-OSTree hosts will enter a pretty name like http://photon-srv.yourcompany.com, rather than remember a numeric IP address.
28 28
 
29
-Having the server configured, you may advance to next chapter to [[install your own host from this server's repository|Photon-RPM-OSTree:-7-Installing-a-host-against-a-custom-server-repository]]. That's a way to verify right away that all components (server, network) are running correctly and test the 'minimal' server filetree image by downloading and installing it at the host.
29
+Having the server configured, you may advance to next chapter to [install your own host from this server's repository](Photon-RPM-OSTree-7-Installing-a-host-against-a-custom-server-repository.md). That's a way to verify right away that all components (server, network) are running correctly and test the 'minimal' server filetree image by downloading and installing it at the host.
30 30
 
31
-### 6.2 Composing your first OSTree repo  
31
+## 6.2 Composing your first OSTree repo  
32 32
 If you've installed Photon 2.0 OSTree server, the server did not setup a tree as part of an installation, but configuration files for starter 'base', 'minimal' and 'full' tree are there for you. To create a 'minimal' tree, you only need two commands - one to initialize a new repo, the other one to compose it.
33 33
 ```
34 34
 root [ ~ ]# cd /srv/rpm-ostree
35 35
 root [ /srv/rpm-ostree ]# ostree --repo=repo init --mode=archive-z2
36 36
 root [ /srv/rpm-ostree ]# rpm-ostree compose tree --repo=repo photon-base.json
37 37
 ```
38
-You are now ready to deploy a host, explained in next chapter. Skip to [[Chapter 8: File oriented server operations|Photon-RPM-OStree:-8-File-oriented-server-operations]] and [[Chapter 9: Package oriented server operations|Photon-RPM-OSTree:-9-Package-oriented-server-operations]] to learn create your own customized file tree.   
38
+You are now ready to deploy a host, explained in next chapter. Skip to [Chapter 8: File oriented server operations](Photon-RPM-OStree-8-File-oriented-server-operations.md) and [Chapter 9: Package oriented server operations](Photon-RPM-OSTree-9-Package-oriented-server-operations.md) to learn create your own customized file tree.   
39 39
 
40
-### 6.2 Automated install of a server via kickstart
40
+## 6.2 Automated install of a server via kickstart
41 41
 All Photon OS versions support unattended install, in other words installer will display its progress, but will not prompt for any keys to be clicked, and will boot at the end of installation. This will create an identical server as installing via UI.
42 42
 
43
-If not familiar with the way kickstart works, visit [[Kickstart Support in Photon OS|https://github.com/vmware/photon/blob/master/docs/kickstart.md]]. The kickstart json config for OSTree is similar to minimal or full, except for this setting:  
43
+If not familiar with the way kickstart works, visit [Kickstart Support in Photon OS](kickstart.md). The kickstart json config for OSTree is similar to minimal or full, except for this setting:  
44 44
 ```
45 45
 "type": "ostree_server"
46 46
 ```
47 47
 
48
-[[Back to main page|Photon-RPM-OSTree:-a-simple-guide]] | [[Previous page|Photon-RPM-OSTree:-5-Host-updating-operations]] | [[Next page >|Photon-RPM-OSTree:-7-Installing-a-host-against-a-custom-server-repository]]
49 48
\ No newline at end of file
... ...
@@ -1,14 +1,16 @@
1
+# Installing a Photon RPM-OStree host against a custom server repository
2
+
1 3
 Organizations that maintain their own OSTree servers create custom image trees suited to their needs from which hosts can be deployed and upgraded. One single server may make available several branches to install, for example "base", "minimal" and "full". Or, if you think in terms of Windows OS SKUs - "Home", "Professional" or "Enterprise" edition.
2 4
 
3 5
 So in fact there are two pieces of information the OSTree host installer needs - the server URL and the branch ref. Also, there are two ways to pass this info - manually via keyboard, when prompted and automated, by reading from a config file.
4 6
 
5
-### 7.1 Manual install of a custom host
6
-For Photon 1.0 or 1.0 Revision 2, installing a Photon RPM-OSTree host that will pull from a server repository of your choice is very similar to the way we installed the host against the default server repo in [[Chapter 2|Photon-RPM-OSTree:-2-Installing-a-host-against-default-server-repository]].  
7
+## 7.1 Manual install of a custom host
8
+For Photon 1.0 or 1.0 Revision 2, installing a Photon RPM-OSTree host that will pull from a server repository of your choice is very similar to the way we installed the host against the default server repo in [Chapter 2](Photon-RPM-OSTree-2-Installing-a-host-against-default-server-repository.md).  
7 9
 We will follow the same steps, selecting "Photon OSTree Host", and after assigning a host name like **photon-host** and a root password, this time we will click on "Custom RPM-OSTree Server".  
8 10
 
9 11
 ![PhotonHostCustom](https://cloud.githubusercontent.com/assets/13158414/14804629/fe17c7d4-0b19-11e6-9cc6-7e79f768b7b1.png)
10 12
 
11
-An additional screen will ask for the URL of server repo - just enter the IP address or fully qualified domain name of the [[server installed in the previous step|Photon-RPM-OSTree:-6-Installing-a-server]].  
13
+An additional screen will ask for the URL of server repo - just enter the IP address or fully qualified domain name of the [server installed in the previous step](Photon-RPM-OSTree-6-Installing-a-server.md).  
12 14
 
13 15
 ![PhotonHostCustomURL](https://cloud.githubusercontent.com/assets/13158414/14804647/185f1aa2-0b1a-11e6-9e44-e2f54592da35.png)
14 16
 
... ...
@@ -17,14 +19,14 @@ You will then be asked to enter a Refspec. Leave the default 'photon/1.0/x86_64/
17 17
 ![PhotonHostCustomRefspec](https://cloud.githubusercontent.com/assets/13158414/14804653/1f0d31cc-0b1a-11e6-8f56-e8cac1f72852.png)
18 18
 
19 19
 Once this is done and the installation finished, reboot and you are ready to use it.  
20
-You may verify - just like in [[Chapter 3.1|Photon-RPM-OStree:-3-Concepts-in-action#31-querying-the-deployed-filetrees]] - that you can get an rpm-ostree status. The value for the CommitID should be identical to the [[host that installed from default repo|Photon-RPM-OSTree:-2-Installing-a-host-against-default-server-repository]], if the [[server|Photon-RPM-OSTree:-6-Installing-a-server]] has been installed fresh, from the same ISO.  
20
+You may verify - just like in [Chapter 3.1](Photon-RPM-OStree-3-Concepts-in-action#31-querying-the-deployed-filetrees.md) - that you can get an rpm-ostree status. The value for the CommitID should be identical to the [host that installed from default repo](Photon-RPM-OSTree-2-Installing-a-host-against-default-server-repository.md), if the [server](Photon-RPM-OSTree-6-Installing-a-server.md) has been installed fresh, from the same ISO.  
21 21
 
22 22
 Photon 2.0 does not provide the UI option to install an RPM-OSTree host, but supports automated, UI-less install, that we'll explore next.
23 23
 
24
-### 7.2 Automated install of a custom host via kickstart
24
+## 7.2 Automated install of a custom host via kickstart
25 25
 Photon 1.0, 1.0 Revision 2 and Photon OS 2.0 support automated install that will not interact with the user, in other words installer will display its progress, but will not prompt for any keys to be clicked, and will boot at the end of installation.  
26 26
 
27
-If not familiar with the way kickstart works, visit [[Kickstart Support in Photon OS|https://github.com/vmware/photon/blob/master/docs/kickstart.md]]. The kickstart json config for OSTree is similar to minimal or full, except for these settings that should sound familiar: 
27
+If not familiar with the way kickstart works, visit [Kickstart Support in Photon OS](kickstart.md). The kickstart json config for OSTree is similar to minimal or full, except for these settings that should sound familiar: 
28 28
 ```
29 29
     ...
30 30
     "type": "ostree_host",
... ...
@@ -35,5 +37,3 @@ If not familiar with the way kickstart works, visit [[Kickstart Support in Photo
35 35
 If the server is Photon OS 2.0, and the administrator composed trees for the included json files, the ostree_repo_ref will take either value: **photon/2.0/x86_64/base**, **photon/2.0/x86_64/minimal**, or **photon/2.0/x86_64/full**.
36 36
 
37 37
 In most situations, kickstart file is accessed via http from PXE boot. That enables booting from network and end to end install of hosts from pre-defined server URL and branch without assistance from user. 
38
-
39
-[[Back to main page|Photon-RPM-OSTree:-a-simple-guide]] | [[Previous Page|Photon-RPM-OSTree:-6-Installing-a-server]] | [[Next page >|Photon-RPM-OStree:-8-File-oriented-server-operations]]
40 38
\ No newline at end of file
... ...
@@ -1,4 +1,6 @@
1
-Now that we have a Photon RPM-OSTree server up and running (if not, see how to [[install|Photon-RPM-OSTree:-6-Installing-a-server]] one), we will learn how to provide the desired set of packages as input and instruct rpm-ostree to compose a filetree, that will result in creation (or update) of an OSTree repo.   
1
+# Package Oriented Server Operations
2
+
3
+Now that we have a Photon RPM-OSTree server up and running (if not, see how to [install](Photon-RPM-OSTree-6-Installing-a-server.md)), we will learn how to provide the desired set of packages as input and instruct rpm-ostree to compose a filetree, that will result in creation (or update) of an OSTree repo.   
2 4
 The simplest way to explain is to take a look at the files installed by the Photon RPM-OSTree server during setup.  
3 5
 ```  
4 6
 root [ ~ ]# cd /srv/rpm-ostree/
... ...
@@ -13,7 +15,7 @@ lrwxrwxrwx 1 root root   28 Aug 28 19:06 photon-ostree.repo -> /etc/yum.repos.d/
13 13
 lrwxrwxrwx 1 root root   36 Aug 28 19:06 photon-updates-ostree.repo -> /etc/yum.repos.d/photon-updates.repo
14 14
 drwxr-xr-x 7 root root 4096 Aug 20 22:27 repo
15 15
 ```
16
-### 9.1 JSON configuration file
16
+## 9.1 JSON configuration file
17 17
 How can we tell rpm-ostree what packages we want to include, where to get them from and how to compose the filetree? There is JSON file for that. Let's take a look at photon-base.json used by the Photon OS team.  
18 18
 ```
19 19
 root [ /srv/rpm-ostree ]# cat photon-base.json 
... ...
@@ -50,15 +52,15 @@ root [ /srv/rpm-ostree ]# cat photon-base.json
50 50
 }
51 51
 ``` 
52 52
 There are some mandatory settings, some optional. I'm only going to explain the most important ones for our use case.  
53
-**osname** and **ref** should be familiar, they have been explained in previous sections [[OSname|Photon-RPM-OStree:-3-Concepts-in-action#34-osname]] and [[Refspec|Photon-RPM-OStree:-3-Concepts-in-action#35-refspec]]. Basicaly, we are asking `rpm-ostree` to compose a tree for photon OS and photon/1.0/x86_64/minimal branch.
53
+**osname** and **ref** should be familiar, they have been explained in previous sections [OSname](Photon-RPM-OStree-3-Concepts-in-action.md#34-osname) and [Refspec](Photon-RPM-OStree-3-Concepts-in-action.md#35-refspec). Basicaly, we are asking `rpm-ostree` to compose a tree for photon OS and photon/1.0/x86_64/minimal branch.
54 54
 
55
-### 9.2 Package addition, removal, upgrade 
55
+## 9.2 Package addition, removal, upgrade 
56 56
 **packages** is the list of packages that are to be added, in this case, in the "minimal" installation profile, on top of the packages already included by default. This is not quite the identical set of RPMS you get when you select the minimal profile in the ISO installer, but it's pretty close and that's why it's been named the same. 
57 57
 Let's add to the list three new packages: gawk, sudo and wget using `vim photon-base.json`
58 58
 
59 59
 **!!!Warning: do not remove any packages from the default list, even an "innocent" one, as it may bring the system to an unstable condition.  During my testing, I've removed "which"; it turns out it was used to figure out the grub booting roots: on reboot, the system was left hanging at grub prompt.**
60 60
 
61
-### 9.3 RPMS repository
61
+## 9.3 RPMS repository
62 62
 But where are these packages located? RPM-OStree uses the same standard RPMS repositories, that yum installs from.
63 63
 ``` 
64 64
 root [ /srv/rpm-ostree ]# ls /etc/yum.repos.d/
... ...
@@ -90,7 +92,7 @@ noarch  repodata  x86_64
90 90
 ```
91 91
 All you have to do now is to replace the `"repos": ["photon"]` entry by `"repos": ["photon-iso"]`, which will point to the RPMS repo on CD-ROM, rather than the online repo. This way, composing saves time, bandwidth and reduces to zero the risk of failure because of a networking issue. 
92 92
 
93
-_**Note**_: Check from time to time if the [[known issue|Photon-RPM-OSTree:-Appendix-A:-Known-issues#error-composing-when-photon-iso-repo-is-selected]] has been fixed.
93
+_**Note**_: Check from time to time if the [known issue](Photon-RPM-OSTree-Appendix-A:-Known-issues.md#error-composing-when-photon-iso-repo-is-selected) has been fixed.
94 94
 ```
95 95
 root [ /srv/rpm-ostree ]# cat /etc/yum.repos.d/photon-iso.repo 
96 96
 [photon-iso]
... ...
@@ -105,7 +107,7 @@ skip_if_unavailable=True
105 105
 There are already in current directory links created to all repositories in /etc/yum.repos.d, so they are found when tree compose command is invoked. You may add any other repo to the list and include packages found in that repo to be part of the image. 
106 106
 
107 107
 
108
-### 9.4 Composing a tree
108
+## 9.4 Composing a tree
109 109
 After so much preparation, it's time to execute a tree compose. We've only added 3 new packages and changed the RPMS repo source. Assuming you've already edited the JSON file, let's do it.
110 110
 ```
111 111
 root [ /srv/rpm-ostree ]# rpm-ostree compose tree --repo=repo photon-base.json
... ...
@@ -222,13 +224,13 @@ No apparent changes since previous commit; use --force-nocache to override
222 222
 This takes several minutes. Then why is the RPM-OSTree server installing so fast, in 45 seconds on my SSD? The server doesn't compose the tree, it uses a pre-created OSTree repo that is stored on the CD-ROM. It comes of course at the expense of larger CD-ROM size. This OSTree repo is created from the same set of RPMS on the CD-ROM, so if you compose fresh, you will get the same exact tree, with same commit ID for the "minimal" ref. 
223 223
 
224 224
 
225
-### 9.5 Automatic version prefix
225
+## 9.5 Automatic version prefix
226 226
 If you recall the filetree version explained earlier, this is where it comes into play. When a tree is composed from scratch, the first version (0) associated to the initial commit is going to get that human readable value. Any subsequent compose operation will auto-increment to .1, .2, .3 and so on.  
227 227
 It's a good idea to start a versionning scheme of your own, so that your customized Photon builds that may get different packages of your choice don't get the same version numbers as the official Photon team builds, coming from VMware's bintray OSTree repository. There is no conflict, it's just confusing to have same name for different commits coming from different repos!  
228 228
 So if you work for a company named Big Data Inc., you may want to switch to a new versioning scheme `"automatic_version_prefix": "1.0_bigdata"`.
229 229
 
230 230
 
231
-### 9.6 Installing package updates
231
+## 9.6 Installing package updates
232 232
 If you want to provide hosts with the package updates that VMware periodically releases, all that you need to do is to add the photon-updates.repo to the list of repos in photon-base.json and then re-compose the usual way. 
233 233
 ```
234 234
 "repos": ["photon", "photon-updates"],
... ...
@@ -314,9 +316,6 @@ Added:
314 314
  libssh2-1.8.0-1.ph1.x86_64
315 315
 ``` 
316 316
 
317
-### 9.7 Composing for a different branch
317
+## 9.7 Composing for a different branch
318 318
 RPM-OSTree makes it very easy to create and update new branches, by composing using json config files that include the Refspec as the new branch name, the list of packages and the other settings we are now familiar with.  Photon OS 2.0 RPM-OSTRee Server installer adds two extra files photon-minimal.json and photon-full.json in addition to photon-base.json, that correspond almost identically to the minimal and full profiles installed via tdnf. It also makes 'photon-base' a smaller set of starter branch.  
319
-Of course, you can create your own config files for your branches with desired lists of packages. You may compose on top of the existing tree, or you can [[start fresh your own OSTRee repo|Photon-RPM-OSTree:-8-File-oriented-server-operations#81-starting-a-fresh-ostree-repo]], using your own customized versioning.
320
-
321
-
322
-[[Back to main page|Photon-RPM-OSTree:-a-simple-guide]] | [[Previous page|Photon-RPM-OSTree:-8-File-oriented-server-operations]]  | [[Next page >|Photon RPM-OSTree:-10-Remotes]]
323 319
\ No newline at end of file
320
+Of course, you can create your own config files for your branches with desired lists of packages. You may compose on top of the existing tree, or you can [start fresh your own OSTRee repo](Photon-RPM-OSTree-8-File-oriented-server-operations.md#81-starting-a-fresh-ostree-repo), using your own customized versioning.
... ...
@@ -1,4 +1,6 @@
1
-### Photon 1.0 GA: systemd-networkd and systemd-resolved not starting in the updated image, on reboot
1
+# Appendix
2
+
3
+## Photon 1.0 GA: systemd-networkd and systemd-resolved not starting in the updated image, on reboot
2 4
 This issue has been fixed in 1.0 Revision 2 and above.
3 5
 If you compose a custom image at the server, download at the RPM-OSTree host the updated image and reboot, systemd-networkd may report an access denied error, in which case your network interface is not properly configured, and ifconfig will not list an external IP address. This is a bug that was discovered very late and we didn't have time to address it for Photon 1.0. The easy workaround is to temporary relax the server permissions before  composing the tree (image) and revert back to the secure umask after that. Here are the steps to recover, that work even after you've already composed a "bad" image and some hosts have downloaded and booted into it:  
4 6
 At server:  
... ...
@@ -11,7 +13,7 @@ At every host that booted into the bad image, from console:
11 11
   2. Login after reboot, then execute **rpm-ostree upgrade** to download the new, good image from server. It's going to skip the bad image version.  
12 12
   3. Reboot into new good image and execute ifconfig, notice you now have an external IP address. Also, your host will have the recommended secure umask 0027 set.
13 13
  
14
-### OSTree repo is no longer accessible via http after RPM-OSTree server has updated httpd package
14
+## OSTree repo is no longer accessible via http after RPM-OSTree server has updated httpd package
15 15
 If server itself is updated via tdnf that brings a newer version of httpd package, httpd.service file will be overwritten to a default value (not valid for OSTree repo), and hosts trying to install or upgrade will report an "invalid or missing config".  To fix the problem:  
16 16
 
17 17
 * Replace the content of /usr/lib/systemd/system/httpd.service with:
... ...
@@ -34,18 +36,17 @@ WantedBy=multi-user.target
34 34
 * systemctl daemon-reload
35 35
 * systemctl restart httpd
36 36
 
37
-### Error composing when photon-iso repo is selected
37
+## Error composing when photon-iso repo is selected
38 38
 If you are doing the trick explained in 9.3 to speed up composing by getting the RPMS from cdrom instead of the online repo, you may encounter an **error: cache too old:**. We are investigating - it could be an rpm-ostree bug or some incompatibility between the caching in tdnf vs. libhif used by ostree, but meanwhile just leave **"repos": ["photon"],** in photon-base.json.  
39 39
   
40
-### Package differences between RPM-OSTree "minimal" and minimal installation profile
40
+## Package differences between RPM-OSTree "minimal" and minimal installation profile
41 41
 This is not an actual issue, I'm only mentioning because of naming - people may expect that installing an RPM-OSTree host using the **photon/1.0/x86_64/minimal** reftag will create an exact equivalent, albeit read-only replica of the Photon minimal, when in fact you get fewer packages. That is because we were constrained by size of the starter ostree repo included on the cdrom, needed in order to install fast the server and the default host, yet still small enough for the ISO installer to run in 384 MB RAM in Fusion and Workstation, 512 MB in ESX.
42 42
 
43 43
 That's easy to overcome - just add the wanted package names in the photon-base.json and re-compose the tree.
44 44
 
45 45
 
46 46
 
47
-### Manual pages not included for installed packages
47
+## Manual pages not included for installed packages
48 48
 The packages in photon-base.json don't have their manual pages installed. This is for the same reason - keep the cdrom included ostree repo size small. If the manual pages are desired, just change to true the **documentation** setting in photon-base.json and re-compose.
49 49
 
50 50
 
51
-[[Back to main page|Photon-RPM-OSTree:-a-simple-guide]] | [[Previous page|Photon-RPM-OSTree:-Install-or-rebase-to-Photon-OS-2.0]]
... ...
@@ -1,28 +1,30 @@
1
+# Install or rebase to Photon OS 2.0
2
+
1 3
 Photon OS 2.0 release has a different focus and while it provides full RPM-OSTree functionality (updated to 2017), it lets the user drive it, rather than provide a pre-defined solution as part of the installation.  
2 4
 
3 5
 The number of packages included in the RPMS repo in Photon OS 2.0 increased significantly, compared to 1.0. To keep the ISO at reasonable size, Photon OS 2.0 no longer includes the compressed ostree.repo file, that helped optimize both the server and host install in 1.0 or 1.0 Rev2. That decision affected the OSTree features we ship out of the box. Customer could achieve the same results by several additional simple steps, that will be explained in this chapter. In addition, there is a new way to create a host raw image at server.
4 6
 
5
-### 12.1 Installing an RPM-OSTree server
7
+## 12.1 Installing an RPM-OSTree server
6 8
 Photon OS 2.0 installer contains an option to install an OSTree server, just like Photon 1.0 OS does. It will not run, however, the server 'compose tree' as part of installation, as most users will want to start from scratch to create their own image anyway, using different package set and customized settings.
7
-In addition to starter photon-base.json, we provide photon-minimal.json and photon-full.json, updated with a 2.0 Refspec. We still fire up an Apache web server, that will point to an empty site initially at the repo directory. Assuming you've customized photon-base.json to you liking, all you need to do is to run the commands you are already familiar with from [[Chapter 9|Photon-RPM-OSTree:-9-Package-oriented-server-operations]].
9
+In addition to starter photon-base.json, we provide photon-minimal.json and photon-full.json, updated with a 2.0 Refspec. We still fire up an Apache web server, that will point to an empty site initially at the repo directory. Assuming you've customized photon-base.json to you liking, all you need to do is to run the commands you are already familiar with from [Chapter 9](Photon-RPM-OSTree-9-Package-oriented-server-operations.md).
8 10
 ```
9 11
 root [ /srv/rpm-ostree ]# ostree --repo=repo init --mode=archive-z2
10 12
 root [ /srv/rpm-ostree ]# rpm-ostree compose tree --repo=repo photon-base.json
11 13
 ```
12 14
 Now if you point a browser to http://<server_IP_address>, you should see the familiar directory structure of an OSTree repo.
13 15
 
14
-### 12.2 Installing an RPM-OSTree host
16
+## 12.2 Installing an RPM-OSTree host
15 17
 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.  
16
-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#72-automated-install-of-a-custom-host-via-kickstart]].  
18
+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).  
17 19
 
18
-### 12.3 Rebasing a host from Photon 1.0 to 2.0
20
+## 12.3 Rebasing a host from Photon 1.0 to 2.0
19 21
 If kickstart sounds too complicated and we still want to go the UI way like in 1.0, fortunately, there is a workaround that requires an extra step. Also, if you have an installed Photon 1.0 or 1.0 Rev2 that you want to carry to 2.0, you need to rebase it. Notice that I didn't say "upgrade".   
20 22
 
21 23
 Basically the OSTree repo will switch to a different branch on a different server, following the new server's branch versioning scheme. The net result is that the lots of packages will get changed to newer versions from newer OSTree repo, that has been composed from a newer Photon OS 2.0 RPMS repo. Again, I didn't say "upgraded", neither the rebase command output, that lists "changed" packages. Some obsolete packages will be removed, new packages will be added, either because they didn't exist in 1.0 repo, or because the new config file includes them.  
22 24
 The OS name is the same (Photon), so the content in /var and /etc will be transferred over.  
23 25
 
24
-1. To install fresh, deploy a Photon 1.0 Rev2 host default, as described in [[Chapter 2|Photon-RPM-OSTree:-2-Installing-a-host-against-default-server-repository]]. Of course, if you already have an existing Photon OS 1.0 host that you want to move to 2.0, skip this step.
25
-2. Edit /ostree/repo/config and substitute the url, providing the IP address for the Photon OS 2.0 RPM-OSTree server installed above. This was explained in [[Chapter 10|Photon-RPM-OSTree:-10-Remotes#102-switching-repositories]].  
26
+1. To install fresh, deploy a Photon 1.0 Rev2 host default, as described in [Chapter 2](Photon-RPM-OSTree-2-Installing-a-host-against-default-server-repository.md). Of course, if you already have an existing Photon OS 1.0 host that you want to move to 2.0, skip this step.
27
+2. Edit /ostree/repo/config and substitute the url, providing the IP address for the Photon OS 2.0 RPM-OSTree server installed above. This was explained in [Chapter 10](Photon-RPM-OSTree-10-Remotes.md#102-switching-repositories).  
26 28
 ostree should confirm that is the updated server IP for the "photon" remote.
27 29
 ```
28 30
 root@ostree-host [ ~ ]# ostree remote show-url photon
... ...
@@ -186,7 +188,6 @@ Deployments:
186 186
 
187 187
 There are some side effects of installing Photon OS 2.0 based on the skeleton of a 1.0. For one, the custom disk partitioning is not available in 1.0. There could be others, I cannot think of now.
188 188
 
189
-### 12.4 Creating a host raw image
189
+## 12.4 Creating a host raw image
190 190
 It is now possible to run at server a script that is part of RPM-OStree package, to create a host raw mage.
191 191
 
192
-[[Back to main page|Photon-RPM-OSTree:-a-simple-guide]] | [[Previous page|Photon-RPM-OSTree:-11-Running-container-applications-between-bootable-images]] | [[ Next page >|Photon-RPM-OSTree:-Appendix-A:-Known-issues]]
193 192
deleted file mode 100644
... ...
@@ -1,18 +0,0 @@
1
-To my knowledge, this is the first online documentation that exposes the secrets of RPM-OSTree in a practical manner, with code examples at every step of the way.   
2
-
3
-While it started as a set of Wiki pages on this topic, it ended up in some sort of a mini online book, taking the reader from theoretical concepts to practical samples, from simple to complex, in a progressive way. I've tried as much as I can not to duplicate information that is already available at the [OSTree official site](https://wiki.gnome.org/Projects/OSTree), limiting to only how much is needed to understand the practical examples.
4
-
5
-I wrote this mini-book from my own notes, based on my own experiments with this technology and working with my counter-part developer for the feature. It was necessary to understand how RPM-OSTree works in order to prepare test cases for its Photon application, even though public documentation is very sparse and sample code was almost non-existent. We've set the ambitious goal to make it work in Photon OS Technology Preview 2, which has been unveiled at VMWorld 2015 in San Francisco, along with a suite of other products in the same family.  
6
-
7
-Many thanks to Touseef Liaqat, the main developer who wrote the Photon / RPM-OSTree integration code. Also, many thanks to the people (whom I never met) who designed this cool technology. 
8
-
9
-Except for some school project and my short stint at Amazon, I have not developed much in Linux. I've worked for Microsoft for over 13 years, where in the old days just pronouncing "Linux" or "open source" was sure to [make some people uncomfortable](http://www.theregister.co.uk/2001/06/02/ballmer_linux_is_a_cancer/). Now things have changed even over there.  
10
-
11
-I just turned two months ... of employment with VMware and I'm part of a team that puts together a Linux distribution built from scratch.  It's been awesome so far!
12
-
13
-Should you have any question, comments, suggestions, technical and language corrections (well, my first language is not English), please write to me at [dmoraru@vmware.com](mailto:dmoraru@vmware.com) or [danutm@msn.com](mailto:danutm@msn.com). 
14
-
15
-Danut Moraru - August 31th, 2015  
16
-Bellevue, WA  
17
-
18
-[[Back to main page|Photon-RPM-OSTree:-a-simple-guide]] | [[Previous page|Photon-RPM-OSTree:-a-simple-guide]] | [[ Next page >|Photon-RPM-OSTree:-1-Introduction]]
19 1
\ No newline at end of file
... ...
@@ -1,83 +1,80 @@
1
-Contents  
1
+# Photon RPM OSTree: a simple guide
2
+
3
+## Contents  
2 4
 ***
3 5
 
4
-   [[Preface|Photon-RPM-OSTree:-Preface]]  
5 6
 
6
-1. [[Introduction|Photon RPM-OSTree:-1-Introduction]]  
7
-1.1 [[What is OSTree? How about RPM-OSTree?|Photon RPM-OSTree:-1-Introduction#11-what-is-ostree-how-about-rpm-ostree]]  
8
-1.2 [[Why use RPM-OSTree in Photon?|Photon RPM-OSTree:-1-Introduction#12-why-use-rpm-ostree-in-photon]]  
9
-1.3 [[Photon with RPM-OSTree installation profiles|Photon RPM-OSTree:-1-Introduction#13-photon-with-rpm-ostree-installation-profiles]]  
10
-1.4 [[Terminology|Photon RPM-OSTree:-1-Introduction#14-terminology]]  
11
-1.5 [[Sample code|Photon RPM-OSTree:-1-Introduction#15-sample-code]]  
12
-1.6 [[How to read this book|Photon-RPM-OSTree:-1-Introduction#16-how-to-read-this-book]]  
13
-1.7 [[RPM-OSTree in Photon OS 2.0|Photon-RPM-OSTree:-1-Introduction#17-rpm-ostree-in-photon-os-20]]  
14
-2. [[Installing a Photon RPM-OSTree host against default server repository|Photon-RPM-OSTree:-2-Installing-a-host-against-default-server-repository]]  
15
-2.1 [[Who is this for?|Photon-RPM-OSTree:-2-Installing-a-host-against-default-server-repository#21-who-is-this-for]]  
16
-2.2 [[Installing the ISO, step by step|Photon-RPM-OSTree:-2-Installing-a-host-against-default-server-repository#22-installing-the-iso-step-by-step]]
17
-3. [[Concepts in action|Photon-RPM-OStree:-3-Concepts-in-action]]  
18
-3.1 [[Querying the deployed filetrees|Photon-RPM-OStree:-3-Concepts-in-action#31-querying-the-deployed-filetrees]]  
19
-3.2 [[Bootable filetree version|Photon-RPM-OStree:-3-Concepts-in-action#32-bootable-filetree-version]]  
20
-3.3 [[Commit ID|Photon-RPM-OStree:-3-Concepts-in-action#33-commit-id]]  
21
-3.4 [[OSname|Photon-RPM-OStree:-3-Concepts-in-action#34-osname]]  
22
-3.5 [[Refspec|Photon-RPM-OStree:-3-Concepts-in-action#35-refspec]]  
23
-3.6 [[Deployments|Photon-RPM-OStree:-3-Concepts-in-action#36-deployments]]
24
-4. [[Querying for commit, file and package metadata|Photon-RPM-OSTree:-4-Querying-for-commit,-file-and-package-metadata]]  
25
-4.1 [[Commit history|Photon-RPM-OSTree:-4-Querying-for-commit,-file-and-package-metadata#41-commit-history]]  
26
-4.2 [[Listing file mappings|Photon-RPM-OSTree:-4-Querying-for-commit,-file-and-package-metadata#42-listing-file-mappings]]  
27
-4.3 [[Listing configuration changes|Photon-RPM-OSTree:-4-Querying-for-commit,-file-and-package-metadata#43-listing-configuration-changes]]  
28
-4.4 [[Listing packages|Photon-RPM-OSTree:-4-Querying-for-commit,-file-and-package-metadata#44-listing-packages]]  
29
-4.5 [[Querying for package details|Photon-RPM-OSTree:-4-Querying-for-commit,-file-and-package-metadata#45-querying-for-package-details]]  
30
-4.6 [[Why am I unable to install, update or delete packages?|Photon-RPM-OSTree:-4-Querying-for-commit,-file-and-package-metadata#46-why-am-i-unable-to-install-update-or-delete-packages]]  
31
-5. [[Host updating operations|Photon-RPM-OSTree:-5-Host-updating-operations]]  
32
-5.1 [[Is it an update or an upgrade?|Photon-RPM-OSTree:-5-Host-updating-operations#51-is-it-an-update-or-an-upgrade]]  
33
-5.2 [[Incremental upgrade|Photon-RPM-OSTree:-5-Host-updating-operations#52-incremental-upgrade]]  
34
-5.3 [[Listing file differences|Photon-RPM-OSTree:-5-Host-updating-operations#52-listing-file-differences]]  
35
-5.4 [[Listing package differences|Photon-RPM-OSTree:-5-Host-updating-operations#52-listing-package-differences]]  
36
-5.5 [[Rollback|Photon-RPM-OSTree:-5-Host-updating-operations#55-rollback]]  
37
-5.6 [[Deleting a deployed filetree|Photon-RPM-OSTree:-5-Host-updating-operations#56-deleting-a-deployed-filetree]]  
38
-5.7 [[Version skipping upgrade|Photon-RPM-OSTree:-5-Host-updating-operations#57-version-skipping-upgrade]]  
39
-5.8 [[Tracking parent commits|Photon-RPM-OSTree:-5-Host-updating-operations#58-tracking-parent-commits]]  
40
-5.9 [[Resetting a branch to a previous commit|Photon-RPM-OSTree:-5-Host-updating-operations#59-resetting-a-branch-to-a-previous-commit]]  
41
-6. [[Installing a Photon RPM-OSTree server|Photon-RPM-OSTree:-6-Installing-a-server]]  
42
-7. [[Installing a Photon RPM-OStree host against a custom server repository|Photon-RPM-OSTree:-7-Installing-a-host-against-a-custom-server-repository]]  
43
-7.1 [[Manual install of a custom host|Photon-RPM-OSTree:-7-Installing-a-host-against-a-custom-server-repository#71-manual-install-of-a-custom-host]]  
44
-7.2 [[Automated install of a custom host via kickstart|Photon-RPM-OSTree:-7-Installing-a-host-against-a-custom-server-repository#72-automated-install-of-a-custom-host-via-kickstart]]  
45
-8. [[File oriented server operations|Photon-RPM-OSTree:-8-File-oriented-server-operations]]  
46
-8.1 [[Starting a fresh OSTree repo|Photon-RPM-OSTree:-8-File-oriented-server-operations#81-starting-a-fresh-ostree-repo]]  
47
-8.2 [[Checking out a filetree|Photon-RPM-OSTree:-8-File-oriented-server-operations#82-checking-out-a-filetree]]  
48
-8.3 [[Committing changes to a filetree|Photon-RPM-OSTree:-8-File-oriented-server-operations#83-committing-changes-to-a-filetree]]  
49
-8.4 [[Downloading the changes at the host|Photon-RPM-OSTree:-8-File-oriented-server-operations#84-downloading-the-changes-at-the-host]]  
50
-8.5 [[Creating summary metadata|Photon-RPM-OSTree:-8-File-oriented-server-operations#85-creating-summary-metadata]]  
51
-9. [[Package oriented server operations|Photon-RPM-OSTree:-9-Package-oriented-server-operations]]  
52
-9.1 [[JSON configuration file|Photon-RPM-OSTree:-9-Package-oriented-server-operations#91-json-configuration-file]]  
53
-9.2 [[Package addition, removal, upgrade|Photon-RPM-OSTree:-9-Package-oriented-server-operations#92-package-addition-removal-upgrade]]  
54
-9.3 [[RPMS repository|Photon-RPM-OSTree:-9-Package-oriented-server-operations#93-rpms-repository]]  
55
-9.4 [[Composing a tree|Photon-RPM-OSTree:-9-Package-oriented-server-operations#94-composing-a-tree]]  
56
-9.5 [[Automatic version prefix|Photon-RPM-OSTree:-9-Package-oriented-server-operations#95-automatic-version-prefix]]  
57
-9.6 [[Installing package updates|Photon-RPM-OSTree:-9-Package-oriented-server-operations#96-installing-package-updates]]  
58
-9.7 [[Creating server metadata|Photon-RPM-OSTree:-9-Package-oriented-server-operations#97-creating-server-metadata]]  
59
-9.8 [[Starting a fresh OSTree repo|Photon-RPM-OSTree:-9-Package-oriented-server-operations#98-starting-a-fresh-ostree-repo]]  
60
-10. [[Remotes|Photon RPM-OSTree:-10-Remotes]]  
61
-10.1 [[Listing remotes|Photon-RPM-OSTree:-10-Remotes#101-listing-remotes]]  
62
-10.2 [[GPG signature verification|Photon-RPM-OSTree:-10-Remotes#102-gpg-signature-verification]]  
63
-10.3 [[Switching repositories|Photon-RPM-OSTree:-10-Remotes#103-switching-repositories]]  
64
-10.4 [[Adding and removing remotes|Photon-RPM-OSTree:-10-Remotes#104-adding-and-removing-remotes]]  
65
-10.5 [[List available branches|Photon-RPM-OSTree:-10-Remotes#105-list-available-branches]]  
66
-11. [[Running container applications between bootable images|Photon-RPM-OSTree:-11-Running-container-applications-between-bootable-images]]  
67
-11.1 [[Downloading a docker container appliance|Photon-RPM-OSTree:-11-Running-container-applications-between-bootable-images#111-downloading-a-docker-container-appliance]]  
68
-11.2 [[Rebooting into an existing image|Photon-RPM-OSTree:-11-Running-container-applications-between-bootable-images#112-rebooting-into-an-existing-image]]  
69
-11.3 [[Reboot into a newly created image|Photon-RPM-OSTree:-11-Running-container-applications-between-bootable-images#113-reboot-into-a-newly-created-image]]  
70
-12. [[Install or rebase to Photon OS 2.0|Photon-RPM-OSTree:-Install-or-rebase-to-Photon-OS-2.0]]  
71
-12.1 [[Installing an RPM-OSTree server|Photon-RPM-OSTree:-Install-or-rebase-to-Photon-OS-2.0#121-installing-an-rpm-ostree-server]]  
72
-12.2 [[Installing an RPM-OSTree host|Photon-RPM-OSTree:-Install-or-rebase-to-Photon-OS-2.0#122-installing-an-rpm-ostree-host]]  
73
-12.3 [[Rebasing a host from Photon 1.0 to 2.0|Photon-RPM-OSTree:-Install-or-rebase-to-Photon-OS-2.0#123-rebasing-a-host-from-photon-10-to-20]]  
74
-12.4 [[Creating a host raw image|Photon-RPM-OSTree:-Install-or-rebase-to-Photon-OS-2.0#124-creating-a-host-raw-image]]    
7
+1. [Introduction](Photon-RPM-OSTree-1-Introduction.md)  
8
+  1. [What is OSTree? How about RPM-OSTree?](Photon-RPM-OSTree-1-Introduction.md#11-what-is-ostree-how-about-rpm-ostree)
9
+  1. [Why use RPM-OSTree in Photon?](Photon-RPM-OSTree-1-Introduction.md#12-why-use-rpm-ostree-in-photon)
10
+  1. [Photon with RPM-OSTree installation profiles](Photon-RPM-OSTree-1-Introduction.md#13-photon-with-rpm-ostree-installation-profiles)
11
+  1. [Terminology](Photon-RPM-OSTree-1-Introduction.md#14-terminology)
12
+  1. [Sample code](Photon-RPM-OSTree-1-Introduction.md#15-sample-code)
13
+  1. [How to read this book](Photon-RPM-OSTree:-1-Introduction#16-how-to-read-this-book)
14
+  1. [RPM-OSTree in Photon OS 2.0](Photon-RPM-OSTree:-1-Introduction#17-rpm-ostree-in-photon-os-20)
15
+2. [Installing a Photon RPM-OSTree host against default server repository](Photon-RPM-OSTree-2-Installing-a-host-against-default-server-repository.md)  
16
+    1. [Who is this for?](Photon-RPM-OSTree-2-Installing-a-host-against-default-server-repository.md#21-who-is-this-for)
17
+    1. [Installing the ISO, step by step](Photon-RPM-OSTree-2-Installing-a-host-against-default-server-repository.md#22-installing-the-iso-step-by-step)
18
+3. [Concepts in action](Photon-RPM-OStree-3-Concepts-in-action.md)  
19
+    1. [Querying the deployed filetrees](Photon-RPM-OStree-3-Concepts-in-action.md#31-querying-the-deployed-filetrees)
20
+    1. [Bootable filetree version](Photon-RPM-OStree-3-Concepts-in-action.md#32-bootable-filetree-version)
21
+    1. [Commit ID](Photon-RPM-OStree-3-Concepts-in-action.md#33-commit-id)
22
+    1. [OSname](Photon-RPM-OStree-3-Concepts-in-action.md#34-osname)
23
+    1. [Refspec](Photon-RPM-OStree-3-Concepts-in-action.md#35-refspec)
24
+    1. [Deployments](Photon-RPM-OStree-3-Concepts-in-action.md#36-deployments)
25
+4. [Querying for commit, file and package metadata](Photon-RPM-OSTree-4-Querying-for-commit-file-and-package-metadata.md)  
26
+    1. [Commit history](Photon-RPM-OSTree-4-Querying-for-commit-file-and-package-metadata.md#41-commit-history)
27
+    1. [Listing file mappings](Photon-RPM-OSTree-4-Querying-for-commit-file-and-package-metadata.md#42-listing-file-mappings)
28
+    1. [Listing configuration changes](Photon-RPM-OSTree-4-Querying-for-commit-file-and-package-metadata.md#43-listing-configuration-changes)
29
+    1. [Listing packages](Photon-RPM-OSTree-4-Querying-for-commit-file-and-package-metadata.md#44-listing-packages)
30
+    1. [Querying for package details](Photon-RPM-OSTree-4-Querying-for-commit-file-and-package-metadata.md#45-querying-for-package-details)
31
+    1. [Why am I unable to install, update or delete packages?](Photon-RPM-OSTree-4-Querying-for-commit-file-and-package-metadata.md#46-why-am-i-unable-to-install-update-or-delete-packages)
32
+5. [Host updating operations](Photon-RPM-OSTree-5-Host-updating-operations.md)  
33
+    1. [Is it an update or an upgrade?](Photon-RPM-OSTree-5-Host-updating-operations.md#51-is-it-an-update-or-an-upgrade)
34
+    1. [Incremental upgrade](Photon-RPM-OSTree-5-Host-updating-operations.md#52-incremental-upgrade)
35
+    1. [Listing file differences](Photon-RPM-OSTree-5-Host-updating-operations.md#52-listing-file-differences)
36
+    1. [Listing package differences](Photon-RPM-OSTree-5-Host-updating-operations.md#52-listing-package-differences)
37
+    1. [Rollback](Photon-RPM-OSTree-5-Host-updating-operations.md#55-rollback)