Browse code

Revert "Migrating files from photon.wiki to photon repo"

This reverts commit 62d41e9c9f6f5550473042fbacb34767744cf634.

Change-Id: Iba3d5d4ddfb9121ae51e5f42e93928c0b22079ed
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/5888
Reviewed-by: Anish Swaminathan <anishs@vmware.com>
Tested-by: Anish Swaminathan <anishs@vmware.com>

Anish Swaminathan authored on 2018/10/09 03:17:33
Showing 44 changed files
1 1
deleted file mode 100644
... ...
@@ -1,16 +0,0 @@
1
-An official Vagrant box is available on Hashicorp Atlas. To get started: 
2
-
3
-	vagrant init vmware/photon
4
-
5
-Add the following lines to the Vagrantfile: 
6
-
7
-	config.vm.provider "virtualbox" do |v|
8
-	  v.customize ['modifyvm', :id, '--acpi', 'off']
9
-	end
10
-
11
-Install vagrant-guests-photon plugin which provides VMware Photon OS guest support.
12
-It is available at https://github.com/vmware/vagrant-guests-photon.
13
-
14
-Requires VirtualBox 4.3 or later version. If you have issues, please check your version.
15
-
16
-
17 1
deleted file mode 100644
... ...
@@ -1,106 +0,0 @@
1
-Download the Photon OS version that’s right for you. Click one of the links below.
2
-
3
-**Selecting a Download Format**
4
-
5
-Photon OS is available in the following pre-packaged, binary formats.
6
-#### Download Formats ####
7
-| Format | Description |
8
-| --- | --- |
9
-| ISO Image | Contains everything needed to install either the minimal or full installation of Photon OS. The bootable ISO has a manual installer or can be used with PXE/kickstart environments for automated installations. |
10
-| OVA | Pre-installed minimal environment, customized for VMware hypervisor environments. These customizations include a highly sanitized and optimized kernel to give improved boot and runtime performance for containers and Linux applications. Since an OVA is a complete virtual machine definition, we've made available a Photon OS OVA that has virtual hardware version 11; this will allow for compatibility with several versions of VMware platforms or allow for the latest and greatest virtual hardware enhancements. |
11
-| Amazon AMI | Pre-packaged and tested version of Photon OS made ready to deploy in your Amazon EC2 cloud environment. Previously, we'd published documentation on how to create an Amazon compatible instance, but, now we've done the work for you. |
12
-| Google GCE Image | Pre-packaged and tested Google GCE image that is ready to deploy in your Google Compute Engine Environment, with all modifications and package requirements for running Photon OS in GCE. | 
13
-| Azure VHD | Pre-packaged and tested Azure HD image that is ready to deploy in your Microsoft Azure Cloud, with all modifications and package requirements for running Photon OS in Azure. |
14
-
15
-**Downloading Photon OS 2.0 GA**
16
-
17
-Photon OS 2.0 GA is available now! Choose the download that’s right for you and click one of the links below. Refer to the associated sha1sums and md5sums.
18
-#### Photon OS 2.0 GA Binaries ####
19
-| Download | Size | sha1 checksum | md5 checksum |
20
-| --- | --- | --- | --- |
21
-| [Full ISO](http://dl.bintray.com/vmware/photon/2.0/GA/iso/photon-2.0-304b817.iso) | 2.3GB | 68ec892a66e659b18917a12738176bd510cde829 | 6ce66c763589cf1ee49f0144ff7182dc |
22
-| [OVA with virtual hardware v11](http://dl.bintray.com/vmware/photon/2.0/GA/ova/photon-custom-hw11-2.0-304b817.ova) | 108MB | b8c183785bbf582bcd1be7cde7c22e5758fb3f16 | 1ce23d43a778fdeb5283ecd18320d9b5 |
23
-| [OVA with virtual hardware v13 (ESX 6.5 and above)](http://dl.bintray.com/vmware/photon/2.0/GA/ova/photon-custom-hw13-2.0-304b817.ova) | 106MB | 44f7b808ca48ea1af819d222561a14482a15e493 | ec490b65615284a0862e9ee4a7a0ac97 |
24
-| [OVA with virtual hardware v11(Workstation and Fusion)](http://dl.bintray.com/vmware/photon/2.0/GA/ova/photon-custom-lsilogic-hw11-2.0-304b817.ova) | 108MB | 6ed700cbbc5e54ba621e975f28284b27adb71f68 | 586c059bf3373984c761e254bd491f59 |
25
-| [Amazon AMI](http://dl.bintray.com/vmware/photon/2.0/GA/ami/photon-ami-2.0-304b817.tar.gz) | 135MB | 45f4e9bc27f7316fae77c648c8133195d38f96b3 | 486d59eca17ebc948e2f863f2af06eee |
26
-| [Google GCE](http://dl.bintray.com/vmware/photon/2.0/GA/gce/photon-gce-2.0-304b817.tar.gz) | 705MB | b1385dd8464090b96e6b402c32c5d958d43f9fbd | 34953176901f194f02090988e596b1a7 |
27
-| [Azure VHD - gz file](http://dl.bintray.com/vmware/photon/2.0/GA/azure/photon-azure-2.0-304b817.vhd.gz) | 170MB | a77d54351cca43eefcf289a907ec751c32372930 | 86d281f033f3584b11e5721a5cbda2d3 |
28
-| [Azure VHD - gz file - cloud-init provisioning](http://dl.bintray.com/vmware/photon/2.0/GA/azure/photon-azure-2.0-3146fa6.tar.gz) | 172MB | d7709a7b781dad03db55c4999bfa5ef6606efd8b | ee95bffe2c924d9cb2d47a94ecbbea2c |
29
-
30
-***Photon OS 2.0 AMI ID (Update: November 7th, 2017)***
31
-| Region | AMI ID|
32
-| --- | --- |
33
-| N.Virginia | ami-47fe4c3d |
34
-| Ohio | ami-29dff04c |
35
-| N.California | ami-065f6166 |
36
-| Oregon | ami-f6ab7f8e |
37
-
38
-**Downloading Photon OS 2.0 RC**
39
-Photon OS 2.0 RC is available now! Choose the download that’s right for you and click one of the links below. Refer to the associated sha1sums and md5sums.
40
-#### Photon OS 2.0 RC Binaries ####
41
-| Download | Size | sha1 checksum | md5 checksum |
42
-| --- | --- | --- | --- |
43
-| [Full ISO](https://bintray.com/vmware/photon/download_file?file_path=2.0%2FRC%2Fiso%2Fphoton-2.0-31bb961.iso) | 2.2GB | 5c049d5ff40c8f22ae5e969eabd1ee8cd6b834e7 | 88cc8ecf2a7f6ae5ac8eb15f54e4a821 |
44
-| [OVA with virtual hardware v11](https://bintray.com/vmware/photon/download_file?file_path=2.0%2FRC%2Fova%2Fphoton-custom-hw11-2.0-31bb961.ova) | 108MB | 6467ebb31ff23dfd112c1c574854f5655a462cc2 | b2c7fa9c151b1130342f08c2f513f9e1 |
45
-| [OVA with virtual hardware v13 (ESX 6.5 and above)](https://bintray.com/vmware/photon/download_file?file_path=2.0%2FRC%2Fova%2Fphoton-custom-hw13-2.0-31bb961.ova) | 106MB | 5072ec86bcaa2d6e07f4fe3e6aa99063acbbc3f3 | 9331fc10d4526f389d2b658920727925 |
46
-| [Amazon AMI](https://bintray.com/vmware/photon/download_file?file_path=2.0%2FRC%2Fami%2Fphoton-ami-2.0-31bb961.tar.gz) | 135MB | 2461b81f3d7c2325737c6ae12099e4c7ef6a079c | 67458ee457a0cf68d199ab95fc707107 |
47
-| [Google GCE](https://bintray.com/vmware/photon/download_file?file_path=2.0%2FRC%2Fgce%2Fphoton-gce-2.0-31bb961.tar.gz) | 704MB | c65bcc0cbda061c6305f968646be2d72a4283227 | 2dff057540e37a161520ec86e39b17aa |
48
-| [Azure VHD - gz file](https://bintray.com/vmware/photon/download_file?file_path=2.0%2FRC%2Fazure%2Fphoton-azure-2.0-31bb961.vhd.gz) | 169MB | b43a746fead931ae2bb43e9108cde35913b23715 | 3485c7a31741cca07cc11cbf374ec1a5 |
49
-
50
-**Downloading Photon OS 2.0 Beta**
51
-Photon OS 2.0 Beta is here! Choose the download that’s right for you and click one of the links below. Refer to the associated sha1sums and md5sums.
52
-#### Photon OS 2.0 Beta Binaries ####
53
-| Download | Size | sha1 checksum | md5 checksum |
54
-| --- | --- | --- | --- |
55
-| [Full ISO](https://bintray.com/vmware/photon/download_file?file_path=2.0%2FBeta%2Fiso%2Fphoton-2.0-8553d58.iso) | 2.1GB | 7a0e837061805b7aa2649f9ba6652afb2d4591fc | a52c50240726cb3c4219c5c608f9acf3 |
56
-| [OVA with virtual hardware v11](https://bintray.com/vmware/photon/download_file?file_path=2.0%2FBeta%2Fova%2Fphoton-custom-hw11-2.0-8553d58.ova) | 110MB | 30b81b22a7754165ff30cc964b0a4a66b9469805 | fb309ee535cb670fe48677f5bfc74ec0 |
57
-| [Amazon AMI](https://bintray.com/vmware/photon/download_file?file_path=2.0%2FBeta%2Fami%2Fphoton-ami-2.0-8553d58.tar.gz) | 136MB | 320c5b6f6dbf6b000a6036b569b13b11e0e93034 | cc3cff3cf9a9a8d5f404af0d78812ab4 |
58
-| [Google GCE](https://bintray.com/vmware/photon/download_file?file_path=2.0%2FBeta%2Fgce%2Fphoton-gce-2.0-8553d58.tar.gz) | 705MB | c042d46971fa3b642e599b7761c18f4005fc70a7 | 03b873bbd2f0dd1401a334681c59bbf6 |
59
-| [Azure VHD](https://bintray.com/vmware/photon/download_file?file_path=2.0%2FBeta%2Fazure%2Fphoton-azure-2.0-8553d58.vhd) | 17GB | 20cfc506a2425510e68a9d12ea48218676008ffe | 6a531eab9e1f8cba89b1f150d344ecab |
60
-
61
-**Downloading Photon OS 1.0**
62
-
63
-
64
-***Photon OS 1.0 AMI ID (Update: September 28th, 2017)***
65
-| Region | AMI ID|
66
-| --- | --- |
67
-| N Virginia | ami-18758762 |
68
-| Ohio | ami-96200df3 |
69
-| N.California | ami-37360657 |
70
-| Oregon | ami-66b74f1e |
71
-
72
-***Photon OS 1.0, Revision 2 Binaries (Update: January 19th, 2017)***
73
-We've been busy updating RPMs in our repository for months, now, to address both functional and security issues. However, our binaries have remained fixed since their release back in September 2015. In order to make it faster and easier to get a up-to-date Photon OS system, we've repackaged all of our binaries to include all of these RPM updates. For clarity, we'll call these updated binaries, which are still backed by the 1.0 repos - **1.0, Revision 2**.
74
-
75
-Choose the download that’s right for you and click one of the links below.
76
-#### Photon OS 1.0, Revision 2 Binaries ####
77
-| Download | Size | sha1 checksum | md5 checksum |
78
-| --- | --- | --- | --- |
79
-| [Full ISO](https://bintray.com/vmware/photon/download_file?file_path=photon-1.0-62c543d.iso) | 2.4GB | c4c6cb94c261b162e7dac60fdffa96ddb5836d66| 69500c07d25ce9caa9b211a8b6eefd61|
80
-| [OVA with virtual hardware v10](https://bintray.com/vmware/photon/download_file?file_path=photon-custom-hw10-1.0-62c543d.ova) | 159MB | 6e9087ed25394e1bbc56496ae368b8c77efb21cb | 3e4b1a5f24ab463677e3edebd1ecd218|
81
-| [OVA with virtual hardware v11](https://bintray.com/vmware/photon/download_file?file_path=photon-custom-hw11-1.0-62c543d.ova) | 159MB | 18c1a6d31545b757d897c61a0c3cc0e54d8aeeba| be9961a232ad5052b746fccbb5a9672d|
82
-| [Amazon AMI](https://bintray.com/vmware/photon/download_file?file_path=photon-ami-1.0-62c543d.tar.gz) | 590MB | 6df9ed7fda83b54c20bc95ca48fa467f09e58548| 5615a56e5c37f4a9c762f6e3bda7f9d0|
83
-| [Google GCE](https://bintray.com/vmware/photon/download_file?file_path=photon-gce-1.0-62c543d.tar.gz) | 164MB | 1feb68ec00aaa79847ea7d0b00eada7a1ac3b527| 5adb7b30803b168e380718db731de5dd|
84
-
85
-There are a few other ways that you could create a Photon OS instance – either making the ISO from source that’s been cloned from the [GitHub Photon OS repository](https://github.com/vmware/photon), using the [instructions](https://github.com/vmware/photon/blob/master/docs/build-photon.md) found on the GitHub repo, using the [scripted installation](https://github.com/vmware/photon/blob/master/docs/kickstart.md), or [boot Photon OS over a network](https://github.com/vmware/photon/blob/master/docs/PXE-boot.md), using PXE. These options are beyond the scope of this document. If you’re interested in these methods, follow the links provided above. 
86
-
87
-***Photon OS 1.0, Original Binaries***
88
-
89
-If you're looking for the original Photon OS, version 1.0 binaries, they can still be found here:
90
-#### Photon OS 1.0, Original Binaries ####
91
-| Download | Size | sha1 checksum | md5 checksum |
92
-| --- | --- | --- | --- |
93
-| [Full ISO](https://bintray.com/artifact/download/vmware/photon/photon-1.0-13c08b6.iso) | 2.1GB | ebd4ae77f2671ef098cf1e9f16224a4d4163bad1 | 15aea2cf5535057ecb019f3ee3cc9d34 |
94
-| [OVA with virtual hardware v10](https://bintray.com/vmware/photon/download_file?file_path=photon-custom-hw10-1.0-13c08b6.ova) | 292MB | 8669842446b6aac12bd3c8158009305d46b95eac | 3ca7fa49128d1fd16eef1993cdccdd4d |
95
-| [OVA with virtual hardware v11](https://bintray.com/vmware/photon/download_file?file_path=photon-custom-hw11-1.0-13c08b6.ova) | 292MB | 2ee56c5ce355fe6c59888f2f3731fd9d51ff0b4d | 8838498fb8202aac5886518483639073 |
96
-| [Amazon AMI](https://bintray.com/artifact/download/vmware/photon/photon-ami-1.0-13c08b6.tar.gz) | 148.5MB | 91deb839d788ec3c021c6366c192cf5ac601575b | fe657aafdc8189a85430e19ef82fc04a |
97
-| [Google GCE](https://bintray.com/artifact/download/vmware/photon/photon-gce-1.0-13c08b6.tar.gz) | 411.7MB | 397ccc7562f575893c89a899d9beafcde6747d7d | 67a671e032996a26d749b7d57b1b1887 |
98 1
deleted file mode 100644
... ...
@@ -1,167 +0,0 @@
1
-* [What is Photon OS?](#q-what-is-photon-os)
2
-* [How do I get started with Photon OS?](#q-how-do-i-get-started-with-photon-os)
3
-* [Can I upgrade my existing Photon OS 1.0 VMs?](#q-can-i-upgrade-my-existing-photon-os-10-vms)
4
-* [What kind of support comes with Photon OS?](#q-what-kind-of-support-comes-with-photon-os)
5
-* [How can I contribute to Photon OS?](#q-how-can-i-contribute-to-photon-os)
6
-* [How is Photon OS patched?](#q-how-is-Photon-OS-patched)
7
-* [How does Photon OS relate to Project Lightwave?](#q-how-does-photon-os-relate-to-project-lightwave)
8
-* [Will VMware continue to support other container host runtime offerings on vSphere?](#q-will-vmware-continue-to-support-other-container-host-runtime-offerings-on-vsphere)
9
-* [How to report a security vulnerability in Photon OS?](#q-how-to-report-a-security-vulnerability-in-photon-os)
10
-* [What are the Docker improvements in Photon OS 2.0?](#q-what-are-the-docker-improvements-in-photon-os-20)
11
-* [Why is VMware creating Photon OS?](#q-why-is-vmware-creating-photon-os)
12
-* [Why is VMware open-sourcing Photon OS?](#q-why-is-vmware-open-sourcing-photon-os)
13
-* [In what way is Photon OS "optimized for VMware?"](#q-in-what-way-is-photon-os-optimized-for-vmware)
14
-* [Why can't I SSH in as root?](#q-why-cant-i-ssh-in-as-root)
15
-* [Why isn't netstat working?](#q-why-is-netstat-not-working)
16
-* [Why do all of my cloned Photon OS instances have the same IP address when using DHCP?](#q-why-do-all-of-my-cloned-photon-os-instances-have-the-same-ip-address-when-using-dhcp)
17
-* [How to install new packages?](#how-to-install-new-packages)
18
-* [Why is the yum command not working in a minimal installation?](#q-why-the-yum-command-not-working-in-a-minimal-installation)
19
-* [How to install all build essentials?](#q-how-to-install-all-build-essentials)
20
-* [How to build new package for Photon OS?](#q-how-to-build-new-package-for-photon-os)
21
-* [I just booted into freshly installed Photon OS instance, why isn't "docker ps" working?](#q-i-just-booted-into-freshly-installed-photon-os-instance-why-isnt-docker-ps-working)
22
-* [What is the difference between Minimal and Full installation?](#q-what-is-the-difference-between-minimal-and-full-installation)
23
-* [What packages are included in Minimal and Full?](#q-what-packages-are-included-in-minimal-and-full)
24
-* [How do I transfer or share files between Photon OS and my host machine?](#q-how-do-i-transfer-or-share-files-between-photon-and-my-host-machine)
25
-* [Why is the ISO over 2GB, when I hear that Photon OS is a minimal container runtime?](#q-why-is-the-iso-over-2gb-when-i-hear-that-photon-os-is-a-minimal-container-runtime)
26
-
27
-***
28
-
29
-# Getting Started
30
-
31
-## Q. What is Photon OS?
32
-A. Photon OS™ is an open source Linux container host optimized for cloud-native applications, cloud platforms, and VMware infrastructure. Photon OS provides a secure run-time environment for efficiently running containers. For an overview, see [https://vmware.github.io/photon/](https://vmware.github.io/photon/).
33
-
34
-## Q. How do I get started with Photon OS?
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).
38
-
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).
41
-
42
-## Q. What kind of support comes with Photon OS?
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
-
45
-Developers who might want the source code, including those interested in making contributions, should visit the [Photon OS Github repository](https://github.com/vmware/photon). 
46
-
47
-## Q. How can I contribute to Photon OS?
48
-A. We welcome community participation in the development of Photon OS and look forward to broad ecosystem engagement around the project. Getting your idea into Photon OS is just a [GitHub](https://vmware.github.io/photon) pull request away. When you submit a pull request, you'll be asked to accept the Contributor License Agreement (CLA). 
49
-
50
-## Q. How is Photon OS patched?
51
-A. Within a major release, updates will be delivered as package updates. Security updates will be delivered on an as-needed basis. Non-security related updates will happen quarterly, but may not include every, single package update. The focus is on delivering a valid, functional updated stack every quarter.
52
-
53
-Photon OS isn't "patched," as a whole - instead, individual packages are updated (potentially, with patches applied to that individual package). For instance, if a package releases a fix for a critical vulnerability, we'll update the package in the Photon OS repository, for critical issues probably within a day or two. At that point, customers get that updated package by running, "tdnf update <package>"
54
- 
55
-## Q. How does Photon OS relate to Project Lightwave?
56
-A. 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.
57
-Through integration between Photon OS and Project Lightwave, organizations can enforce security and 
58
-governance on container workloads, for example, by ensuring only authorized containers are run on authorized hosts, by authorized users. For details about Lightwave, see [https://github.com/vmware/lightwave](https://github.com/vmware/lightwave).
59
-
60
-## Q. Will VMware continue to support other container host runtime offerings on vSphere?
61
-A. YES, VMware is committed to delivering an infrastructure for all workloads, and for vSphere to have the largest guest OS support in the industry and support customer choice. 
62
-Toward those goals, VMware will continue to work with our technology partners to support new Guest Operating Systems and container host runtimes as they come to the market. Open-sourcing Photon OS will enable optimizations and enhancements for container host runtimes on VMware Platform are available as reference implementation for other container host runtimes as well.
63
-
64
-# Photon OS
65
-## Q. What is Photon OS?
66
-A. Photon OS is an open source, Linux container host runtime optimized for VMware vSphere®. Photon OS is extensible, lightweight, and supports the most common container formats including Docker, Rocket and Garden. Photon OS includes a small footprint, yum-compatible, package-based lifecycle management system, and can support an rpm-ostree image-based system versioning. When used with development tools and environments such as VMware Fusion®, VMware Workstation™, HashiCorp (Vagrant and Atlas) and a production runtime environment (vSphere, VMware vCloud® Air™), Photon OS allows seamless migration of containers-based Apps from development to production.
67
-
68
-## Q. How to report a security vulnerability in Photon OS?
69
-A. VMware encourages users who become aware of a security vulnerability in VMware products to contact VMware with details of the vulnerability. VMware has established an email address that should be used for reporting a vulnerability. Please send descriptions of any vulnerabilities found to security@vmware.com. Please include details on the software and hardware configuration of your system so that we can duplicate the issue being reported.
70
-
71
-Note: We encourage use of encrypted email. Our public PGP key is found at [kb.vmware.com/kb/1055](http://kb.vmware.com/kb/1055).
72
-
73
-VMware hopes that users encountering a new vulnerability will contact us privately as it is in the best interests of our customers that VMware has an opportunity to investigate and confirm a suspected vulnerability before it becomes public knowledge.
74
-
75
-In the case of vulnerabilities found in third-party software components used in VMware products, please also notify VMware as described above.
76
-
77
-## Q. What are the Docker improvements in Photon OS 2.0?
78
-In Photon OS 2.0, the Docker image size (compressed and uncompressed) was reduced to less than a third of its size in Photon OS 1.0. This gain resulted from:
79
-- using toybox (instead of standard core tools), which brings the docker image size from 50MB (in 1.0) to 14MB (in 2.0)
80
-- a package split - in Photon OS 2.0, the binary set contains only bash, tdnf, and toybox; all other installed packages are now libraries only.
81
-
82
-## Q. Why is VMware creating Photon OS?
83
-A. It's about workloads - VMware has always positioned our vSphere platform as a secure, highly-performant platform for enterprise applications. With containers, providing an optimized runtime ensures that customers can embrace these new workload technologies without disrupting existing operations. Over time, Photon OS will extend the capabilities of the software-defined data center such as security, identity and resource management to containerized workloads. Organizations can then leverage a single infrastructure architecture for both traditional and cloud-native Apps, and leverage existing investments in tools, skills and technologies. This converged environment will simplify operation and troubleshooting, and ease the adoption of Cloud-Native Apps. 
84
-
85
-Photon OS can provide a reference implementation for optimizing containers on VMware platforms across compute, network, storage and management. For example, Photon OS can deliver performance through kernel tuning to remove redundant caching between the Linux kernel and the vSphere hypervisor, and advanced security services through network micro-segmentation delivered by VMware NSX™, and more.
86
-
87
-## Q. Why is VMware open-sourcing Photon OS?
88
-A. Open-sourcing Photon OS encourages discussion, innovation, and collaboration with others in the container ecosystem. In particular, we want to make sure the innovations we introduce to Photon to run containers effectively on VMware are also available to any other container runtime OS. 
89
-Additionally, VMware is committed to supporting industry and de facto standards, as doing so also supports stronger security, interoperability, and choice for our customers. 
90
-
91
-## Q. In what way is Photon OS "optimized for VMware?"
92
-
93
-Photon OS 1.0 introduced extensive optimizations for VMware environments, which are described in detail in the following VMware white paper: [Deploying Cloud-Native Applications with Photon OS](https://www.vmware.com/content/dam/digitalmarketing/vmware/en/pdf/whitepaper/vmware-deploying-cloud-native-apps-with-photon-os.pdf). Photon OS 2.0 enhances VMware optimization. The kernel message dumper (new in Photon OS 2.0) is a paravirt feature that extends debugging support. In case of a guest panic, the kernel (through the paravirt channel) dumps the entire kernel log buffer (including the panic message) into the VMware log file (vmware.log) for easy, consolidated access. Previously, this information was stored in a huge vmss (VM suspend state) file.
94
-
95
-## Q. Why can't I SSH in as root?
96
-A. By default Photon does not permit root login to ssh. To make yourself login as root using SSH set PermitRootLogin yes in /etc/ssh/sshd_config, and restart the sshd deamon.
97
-
98
-## Q. Why is netstat not working?
99
-A. netstat is deprecated, ss or ip (part of iproute2) should be used instead.
100
-
101
-## Q. Why do all of my cloned Photon OS instances have the same IP address when using DHCP?
102
-A. Photon OS uses the contents of /etc/machine-id to determine the duid that is used for DHCP requests. If you're going to use a Photon OS instance as the base system for cloning to create additional Photon OS instances, you should clear the machine-id with:
103
-~~~~
104
-    echo -n > /etc/machine-id
105
-~~~~
106
-With this value cleared, systemd will regenerate the machine-id and, as a result, all DHCP requests will contain a unique duid. 
107
-
108
-# How to install new packages?
109
-## Q. Why is the yum command not working in a minimal installation?
110
-A. yum has package dependencies that make the system larger than it needs to be. Photon OS includes [tdnf](https://github.com/vmware/tdnf) - 'tiny' dandified yum - to provide package management and yum-functionality in a much, much smaller footprint. To install packages from cdrom, mount cdrom using following command
111
-~~~~
112
-     mount /dev/cdrom /media/cdrom
113
-~~~~
114
-Then, you can use tdnf to install new packages. For example, to install the vim editor, 
115
-~~~~
116
-     tdnf install vim
117
-~~~~
118
-## Q. How to install all build essentials?
119
-A. Following command can be used to install all build essentials.
120
-~~~~
121
-curl -L https://git.io/v1boE | xargs -I {} tdnf install -y {}
122
-~~~~
123
-## Q. How to build new package for Photon OS??
124
-A. Assuming you have an Ubuntu development environment, setup and get the latest code pull into /workspace. Lets assume your package name is foo with version 1.0.
125
-~~~~
126
-    cp foo-1.0.tar.gz /workspace/photon/SOURCES
127
-    cp foo.spec /workspace/photon/SPECS/foo/
128
-    cd /workspace/photon/support/package-builder
129
-    sudo python ./build_package.py -i foo
130
-~~~~
131
-## Q. I just booted into freshly installed Photon OS instance, why isn't "docker ps" working?
132
-A. Make sure docker daemon is running. By design and default in Photon OS, the docker daemon/engine is not started at boot time. To start the docker daemon for the current session, use the command:
133
-~~~~
134
-    systemctl start docker
135
-~~~~
136
-To start the docker daemon, on boot, use the command:
137
-~~~~
138
-    systemctl enable docker
139
-~~~~
140
-## Q. What is the difference between Minimal and Full installation?
141
-A. Minimal is the minimal set of packages for a container runtime, plus cloud-init.
142
-Full contains all the packages shipped with ISO.
143
-
144
-## Q. What packages are included in Minimal and Full?
145
-A. See [packages_minimal.json](https://github.com/vmware/photon/blob/dev/common/data/packages_minimal.json) as an example
146
-
147
-## Q. How do I transfer or share files between Photon and my host machine?
148
-A. Use vmhgfs-fuse to transfer files between Photon and your host machine:
149
-1. Enable Shared folders in the Workstation or Fusion UI (edit the VM settings and choose Options->Enabled shared folders).
150
-2. Make sure open-vm-tools is installed (it is installed by default in the Minimal installation and OVA import).
151
-3. Run vmware-hgfsclient to list the shares.
152
-
153
-Next, do one of the following:
154
-
155
-- Run the following to mount:
156
-~~~~
157
-vmhgfs-fuse .host:/$(vmware-hgfsclient) /mnt/hgfs
158
-~~~~
159
-OR
160
-
161
-- Add the following line to /etc/fstab:
162
-~~~~
163
-.host:/ /mnt/hgfs fuse.vmhgfs-fuse <options> 0 0
164
-~~~~
165
-
166
-## Q. Why is the ISO over 2GB, when I hear that Photon OS is a minimal container runtime?
167
-A. ISO includes a repository with all Photon OS packages. When you mount the ISO to a machine and boot to the Photon installer, you'll be able to choose the Photon Minimal installation option and the hypervisor-optimized Linux kernel, which will reduce the storage size.
168 1
\ No newline at end of file
169 2
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
- 
30 1
deleted file mode 100644
... ...
@@ -1,34 +0,0 @@
1
-<sub>Posted on January 13, 2016 by [https://il.linkedin.com/in/knesenko '''Kiril Nesenko''']</sub><br />
2
-
3
-To install the DCOS CLI:
4
-Install virtualenv. The Python tool virtualenv is used to manage the DCOS CLI’s environment.
5
-<source lang="bash" enclose="div">
6
-sudo pip install virtualenv
7
-</source><br />
8
-Tip: On some older Python versions, ignore any ‘Insecure Platform’ warnings. For more information, see https://virtualenv.pypa.io/en/latest/installation.html.
9
-From the command line, create a new directory named dcos and navigate into it.
10
-<source lang="bash" enclose="div">
11
-$ mkdir dcos
12
-$ cd dcos
13
-$ curl -O https://downloads.mesosphere.io/dcos-cli/install.sh
14
-</source><br />
15
-Run the DCOS CLI install script, where &lt;hosturl&gt; is the hostname of your master node prefixed with http://:
16
-<source lang="bash" enclose="div">
17
-$ bash install.sh <install_dir> <mesos-master-host>
18
-</source><br />
19
-For example, if the hostname of your Mesos master node is mesos-master.example.com:
20
-<source lang="bash" enclose="div">
21
-$ bash install.sh . http://mesos-master.example.com
22
-</source><br />
23
-Follow the on-screen DCOS CLI instructions and enter the Mesosphere verification code. You can ignore any Python ‘Insecure Platform’ warnings.
24
-<source lang="bash" enclose="div">
25
-Confirm whether you want to add DCOS to your system PATH:
26
-$ Modify your bash profile to add DCOS to your PATH? [yes/no]
27
-</source><br />
28
-Since DCOS CLI is used for DCOS cluster, reconfigure Marathon and Mesos masters URLs with the following commands:
29
-<source lang="bash" enclose="div">
30
-dcos config set core.mesos_master_url http://<mesos-master-host>:5050
31
-dcos config set marathon.url http://<marathon-host>:8080
32
-</source><br />
33
-<br /><br />
34
-Next - [[Install and Configure Mesos DNS on a Mesos Cluster]]
35 1
\ No newline at end of file
36 2
deleted file mode 100644
... ...
@@ -1,52 +0,0 @@
1
-<sub>Posted on January 13, 2016 by [https://il.linkedin.com/in/knesenko '''Kiril Nesenko''']</sub><br />
2
-<br />
3
-In my previous How-To [[Install and Configure a Production Ready Mesos Cluster on PhotonOS]]. In this How-To I am going to explain how to install and configure Marathon for Mesos cluster. All the following steps should be done on each Mesos master.
4
-First, download Marathon:
5
-<source lang="bash" enclose="div">
6
-root@pt-mesos-master2 [ ~ ]# mkdir -p  /opt/mesosphere/marathon/ && cd /opt/mesosphere/marathon/
7
-root@pt-mesos-master2 [ /opt/mesosphere/marathon ]#  curl -O http://downloads.mesosphere.com/marathon/v0.13.0/marathon-0.13.0.tgz
8
-root@pt-mesos-master2 [ /opt/mesosphere/marathon ]# tar -xf marathon-0.13.0.tgz
9
-root@pt-mesos-master2 [ /opt/mesosphere/marathon ]# mv marathon-0.13.0 marathon
10
-</source><br />
11
-Create a configuration for Marathon:
12
-<source lang="bash" enclose="div">
13
-root@pt-mesos-master2 [ /opt/mesosphere/marathon ]# ls -l /etc/marathon/conf/
14
-total 8
15
--rw-r--r-- 1 root root 68 Dec 24 14:33 master
16
--rw-r--r-- 1 root root 71 Dec 24 14:33 zk
17
-root@pt-mesos-master2 [ /opt/mesosphere/marathon ]# cat /etc/marathon/conf/*
18
-zk://192.168.0.2:2181,192.168.0.1:2181,192.168.0.3:2181/mesos
19
-zk://192.168.0.2:2181,192.168.0.1:2181,192.168.0.3:2181/marathon
20
-root@pt-mesos-master2 [ /opt/mesosphere/marathon ]# cat /etc/systemd/system/marathon.service
21
-[Unit]
22
-Description=Marathon
23
-After=network.target
24
-Wants=network.target
25
- 
26
-[Service]
27
-Environment="JAVA_HOME=/opt/OpenJDK-1.8.0.51-bin"
28
-ExecStart=/opt/mesosphere/marathon/bin/start \
29
-    --master zk://192.168.0.2:2181,192.168.0.1:2181,192.168.0.3:2181/mesos \
30
-    --zk zk://192.168.0.2:2181,192.168.0.1:2181,192.168.0.3:2181/marathon
31
-Restart=always
32
-RestartSec=20
33
- 
34
-[Install]
35
-WantedBy=multi-user.target
36
-</source><br />
37
-Finally, we need to change the Marathon startup script, since PhotonOS do not use the standard JRE. Make sure you add JAVA_HOME to Java path:
38
-<source lang="bash" enclose="div">
39
-root@pt-mesos-master2 [ /opt/mesosphere/marathon ]# tail -n3 /opt/mesosphere/marathon/bin/start
40
-# Start Marathon
41
-marathon_jar=$(find "$FRAMEWORK_HOME"/target -name 'marathon-assembly-*.jar' | sort | tail -1)
42
-exec "${JAVA_HOME}/bin/java" "${java_args[@]}" -jar "$marathon_jar" "${app_args[@]}"
43
-</source><br />
44
-Now we can start the Marthon service:
45
-<source lang="bash" enclose="div">
46
-root@pt-mesos-master2 [ /opt/mesosphere/marathon ]# systemctl start marathon
47
-root@pt-mesos-master2 [ /opt/mesosphere/marathon ]# ps -ef | grep marathon
48
-root     15821     1 99 17:14 ?        00:00:08 /opt/OpenJDK-1.8.0.51-bin/bin/java -jar /opt/mesosphere/marathon/bin/../target/scala-2.11/marathon-assembly-0.13.0.jar --master zk://192.168.0.2:2181,192.168.0.1:2181,192.168.0.3:2181/mesos --zk zk://192.168.0.2:2181,192.168.0.1:2181,192.168.0.3:2181/marathon
49
-root     15854 14692  0 17:14 pts/0    00:00:00 grep --color=auto marathon
50
-</source><br />
51
-<br /><br />
52
-Next - [[Install and Configure DCOS CLI for Mesos]]
53 1
\ No newline at end of file
54 2
deleted file mode 100644
... ...
@@ -1,141 +0,0 @@
1
-<sub>Posted on January 13, 2016 by [https://il.linkedin.com/in/knesenko '''Kiril Nesenko''']</sub><br />
2
-= Overview =<br />
3
-Before you read this How-To, please read: [[Install and Configure a Production-Ready Mesos Cluster on PhotonOS]] , [[Install and Configure Marathon for Mesos Cluster on PhotonOS]] and [[Install and Configure DCOS CLI for Mesos]].
4
-After you have fully installed and configured the Mesos cluster, you can execute jobs on it. However, if you want a service discovery and load balancing capabilities you will need to use Mesos-DNS and Haproxy. In this How-To I will explain how to install and configure Mesos-DNS for your Mesos cluster.
5
-Mesos-DNS supports service discovery in Apache Mesos clusters. It allows applications and services running on Mesos to find each other through the domain name system (DNS), similarly to how services discover each other throughout the Internet. Applications launched by Marathon are assigned names like search.marathon.mesos. Mesos-DNS translates these names to the IP address and port on the machine currently running each application. To connect to an application in the Mesos datacenter, all you need to know is its name. Every time a connection is initiated, the DNS translation will point to the right machine in the datacenter.
6
-[[ http://mesosphere.github.io/mesos-dns/img/architecture.png ]]<br />
7
-= Installation =<br />
8
-I will explain how to configure Mesos-DNS docker and run it through Marathon. I will show you how to create a configuration file for a mesos-dns-docker container and how to run it via Marathon.
9
-<source lang="bash" enclose="div">
10
-root@pt-mesos-node1 [ ~ ]# cat /etc/mesos-dns/config.json
11
-{
12
-  "zk": "zk://192.168.0.1:2181,192.168.0.2:2181,192.168.0.3:2181/mesos",
13
-  "masters": ["192.168.0.1:5050", "192.168.0.2:5050", "192.168.0.3:5050"],
14
-  "refreshSeconds": 60,
15
-  "ttl": 60,
16
-  "domain": "mesos",
17
-  "port": 53,
18
-  "resolvers": ["8.8.8.8"],
19
-  "timeout": 5,
20
-  "httpon": true,
21
-  "dnson": true,
22
-  "httpport": 8123,
23
-  "externalon": true,
24
-  "SOAMname": "ns1.mesos",
25
-  "SOARname": "root.ns1.mesos",
26
-  "SOARefresh": 60,
27
-  "SOARetry":   600,
28
-  "SOAExpire":  86400,
29
-  "SOAMinttl": 60
30
-}
31
-</source><br />
32
-'''Create Application Run File'''<br />
33
-Next step is to create a json file and run the service from Marathon for HA. It is possible to run the service via API or via DCOS CLI.
34
-<source lang="bash" enclose="div">
35
-client:~/mesos/jobs$ cat mesos-dns-docker.json
36
-{
37
-    "args": [
38
-        "/mesos-dns",
39
-        "-config=/config.json"
40
-    ],
41
-    "container": {
42
-        "docker": {
43
-            "image": "mesosphere/mesos-dns",
44
-            "network": "HOST"
45
-        },
46
-        "type": "DOCKER",
47
-        "volumes": [
48
-            {
49
-                "containerPath": "/config.json",
50
-                "hostPath": "/etc/mesos-dns/config.json",
51
-                "mode": "RO"
52
-            }
53
-        ]
54
-    },
55
-    "cpus": 0.2,
56
-    "id": "mesos-dns-docker",
57
-    "instances": 3,
58
-    "constraints": [["hostname", "CLUSTER", "pt-mesos-node2.example.com"]]
59
-}
60
-</source>
61
-Now we can see in the Marthon and Mesos UI that we launched the application.
62
-<br /><br />
63
-'''Setup Resolvers and Testing'''<br />
64
-To allow Mesos tasks to use Mesos-DNS as the primary DNS server, you must edit the file ''/etc/resolv.conf'' in every slave and add a new nameserver. For instance, if ''mesos-dns'' runs on the server with IP address  ''192.168.0.5''  at the beginning of ''/etc/resolv.conf'' on every slave.
65
-<source lang="bash" enclose="div">
66
-root@pt-mesos-node2 [ ~/mesos-dns ]# cat /etc/resolv.conf
67
-# This file is managed by systemd-resolved(8). Do not edit.
68
-#
69
-# Third party programs must not access this file directly, but
70
-#only through the symlink at /etc/resolv.conf. To manage
71
-# resolv.conf(5) in a different way, replace the symlink by a
72
-# static file or a different symlink.
73
-nameserver 192.168.0.5
74
-nameserver 192.168.0.4
75
-nameserver 8.8.8.8
76
-</source><br />
77
-Let's run a simple Docker app and see if we can resolve it in DNS.
78
-<source lang="bash" enclose="div">
79
-client:~/mesos/jobs$ cat docker.json
80
-{
81
-    "id": "docker-hello",
82
-    "container": {
83
-        "docker": {
84
-            "image": "centos"
85
-        },
86
-        "type": "DOCKER",
87
-        "volumes": []
88
-    },
89
-    "cmd": "echo hello; sleep 10000",
90
-    "mem": 16,
91
-    "cpus": 0.1,
92
-    "instances": 10,
93
-    "disk": 0.0,
94
-    "ports": [0]
95
-}
96
-</source>
97
-<source lang="bash" enclose="div">
98
-client:~/mesos/jobs$ dcos marathon app add docker.json
99
-</source><br />
100
-Let's try to resolve it.
101
-
102
-<pre>
103
-root@pt-mesos-node2 [ ~/mesos-dns ]# dig _docker-hello._tcp.marathon.mesos SRV
104
-;; Truncated, retrying in TCP mode.
105
-; <<>> DiG 9.10.1-P1 <<>> _docker-hello._tcp.marathon.mesos SRV
106
-;; global options: +cmd
107
-;; Got answer:
108
-;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 25958
109
-;; flags: qr aa rd ra; QUERY: 1, ANSWER: 10, AUTHORITY: 0, ADDITIONAL: 10
110
-;; QUESTION SECTION:
111
-;_docker-hello._tcp.marathon.mesos. IN SRV
112
-;; ANSWER SECTION:
113
-_docker-hello._tcp.marathon.mesos. 60 IN SRV 0 0 31998 docker-hello-4bjcf-s2.marathon.slave.mesos.
114
-_docker-hello._tcp.marathon.mesos. 60 IN SRV 0 0 31844 docker-hello-jexm6-s1.marathon.slave.mesos.
115
-_docker-hello._tcp.marathon.mesos. 60 IN SRV 0 0 31111 docker-hello-6ms44-s2.marathon.slave.mesos.
116
-_docker-hello._tcp.marathon.mesos. 60 IN SRV 0 0 31719 docker-hello-muhui-s2.marathon.slave.mesos.
117
-_docker-hello._tcp.marathon.mesos. 60 IN SRV 0 0 31360 docker-hello-jznf4-s1.marathon.slave.mesos.
118
-_docker-hello._tcp.marathon.mesos. 60 IN SRV 0 0 31306 docker-hello-t41ti-s1.marathon.slave.mesos.
119
-_docker-hello._tcp.marathon.mesos. 60 IN SRV 0 0 31124 docker-hello-mq3oz-s1.marathon.slave.mesos.
120
-_docker-hello._tcp.marathon.mesos. 60 IN SRV 0 0 31816 docker-hello-tcep8-s1.marathon.slave.mesos.
121
-_docker-hello._tcp.marathon.mesos. 60 IN SRV 0 0 31604 docker-hello-5uu37-s1.marathon.slave.mesos.
122
-_docker-hello._tcp.marathon.mesos. 60 IN SRV 0 0 31334 docker-hello-jqihw-s1.marathon.slave.mesos.
123
- 
124
-;; ADDITIONAL SECTION:
125
-docker-hello-muhui-s2.marathon.slave.mesos. 60 IN A 192.168.0.5
126
-docker-hello-4bjcf-s2.marathon.slave.mesos. 60 IN A 192.168.0.5
127
-docker-hello-jexm6-s1.marathon.slave.mesos. 60 IN A 192.168.0.6
128
-docker-hello-jqihw-s1.marathon.slave.mesos. 60 IN A 192.168.0.6
129
-docker-hello-mq3oz-s1.marathon.slave.mesos. 60 IN A 192.168.0.6
130
-docker-hello-tcep8-s1.marathon.slave.mesos. 60 IN A 192.168.0.6
131
-docker-hello-6ms44-s2.marathon.slave.mesos. 60 IN A 192.168.0.5
132
-docker-hello-t41ti-s1.marathon.slave.mesos. 60 IN A 192.168.0.4
133
-docker-hello-jznf4-s1.marathon.slave.mesos. 60 IN A 192.168.0.4
134
-docker-hello-5uu37-s1.marathon.slave.mesos. 60 IN A 192.168.0.4
135
-;; Query time: 0 msec
136
-;; SERVER: 192.168.0.5#53(192.168.0.5)
137
-;; WHEN: Sun Dec 27 14:36:32 UTC 2015
138
-;; MSG SIZE  rcvd: 1066
139
-</pre>
140
-
141
-We can see that we can resolve our app!
142 1
\ No newline at end of file
143 2
deleted file mode 100644
... ...
@@ -1,171 +0,0 @@
1
-== Overview ==
2
-For this setup I will use 3 Mesos masters and 3 slaves. On each Mesos master I will run a Zookeeper, meaning that we will have 3 Zookeepers as well. The Mesos cluster will be configured with a quorum of 2. For networking Mesos use Mesos-DNS. I tried to run Mesos-DNS as container, but got into some resolving issues, so in my next How-To I will explain how to configure Mesos-DNS and run it through Marathon. Photon hosts will be used for masters and slaves.<br />
3
-<br />
4
-''' Masters: '''<br />
5
-{| class="wikitable"
6
-! style="text-align: center; font-weight: bold;" | Hostname
7
-! style="font-weight: bold;" | IP Address
8
-|-
9
-| pt-mesos-master1.example.com
10
-| 192.168.0.1
11
-|-
12
-| pt-mesos-master2.example.com
13
-| 192.168.0.2
14
-|-
15
-| pt-mesos-master3.example.com
16
-| 192.168.0.3
17
-|}
18
-''' Agents: '''<br />
19
-{| class="wikitable"
20
-! style="text-align: center; font-weight: bold; font-size: 0.100em;" | Hostname
21
-! style="font-weight: bold;" | IP Address
22
-|-
23
-| pt-mesos-node1.example.com
24
-| 192.168.0.4
25
-|-
26
-| pt-mesos-node2.example.com
27
-| 192.168.0.5
28
-|-
29
-| pt-mesos-node3.example.com
30
-| 192.168.0.6
31
-|}
32
-<br />
33
-== Masters Installation and Configuration ==
34
-First of all we will install Zookeeper. Since currently there is a bug in Photon related to the Zookeeper installation I will use the tarball. Do the following for each master:
35
-<source lang="bash" enclose="div">
36
-root@pt-mesos-master1 [ ~ ]# mkdir -p /opt/mesosphere && cd /opt/mesosphere && wget http://apache.mivzakim.net/zookeeper/stable/zookeeper-3.4.7.tar.gz
37
-root@pt-mesos-master1 [ /opt/mesosphere ]# tar -xf zookeeper-3.4.7.tar.gz && mv zookeeper-3.4.7 zookeeper
38
-root@pt-mesos-master1 [ ~ ]# cat /opt/mesosphere/zookeeper/conf/zoo.cfg | grep -v '#'
39
-tickTime=2000
40
-initLimit=10
41
-syncLimit=5
42
-dataDir=/var/lib/zookeeper
43
-clientPort=2181
44
-server.1=192.168.0.1:2888:3888
45
-server.2=192.168.0.2:2888:3888
46
-server.3=192.168.0.3:2888:3888
47
-</source><br />
48
-Example of Zookeeper systemd configuration file:
49
-<source lang="bash" enclose="div">
50
-root@pt-mesos-master1 [ ~ ]# cat /etc/systemd/system/zookeeper.service
51
-[Unit]
52
-Description=Apache ZooKeeper
53
-After=network.target
54
- 
55
-[Service]
56
-Environment="JAVA_HOME=/opt/OpenJDK-1.8.0.51-bin"
57
-WorkingDirectory=/opt/mesosphere/zookeeper
58
-ExecStart=/bin/bash -c "/opt/mesosphere/zookeeper/bin/zkServer.sh start-foreground"
59
-Restart=on-failure
60
-RestartSec=20
61
-User=root
62
-Group=root
63
- 
64
-[Install]
65
-WantedBy=multi-user.target
66
-</source><br />
67
-Add server id to the configuration file, so zookeeper will understand the id of your master server. This should be done for each master with its own id.
68
-<source lang="bash" enclose="div">
69
-root@pt-mesos-master1 [ ~ ]# echo 1 > /var/lib/zookeeper/myid
70
-root@pt-mesos-master1 [ ~ ]# cat /var/lib/zookeeper/myid
71
-1
72
-</source><br />
73
-Now lets install the Mesos masters. Do the following for each master:
74
-<source lang="bash" enclose="div">
75
-root@pt-mesos-master1 [ ~ ]# yum -y install mesos
76
-Setting up Install Process
77
-Package mesos-0.23.0-2.ph1tp2.x86_64 already installed and latest version
78
-Nothing to do
79
-root@pt-mesos-master1 [ ~ ]# cat /etc/systemd/system/mesos-master.service
80
-[Unit]
81
-Description=Mesos Slave
82
-After=network.target
83
-Wants=network.target
84
- 
85
-[Service]
86
-ExecStart=/bin/bash -c "/usr/sbin/mesos-master \
87
-    --ip=192.168.0.1 \
88
-    --work_dir=/var/lib/mesos \
89
-    --log_dir=/var/log/mesos \
90
-    --cluster=EXAMPLE \
91
-    --zk=zk://192.168.0.1:2181,192.168.0.2:2181,192.168.0.3:2181/mesos \
92
-    --quorum=2"
93
-KillMode=process
94
-Restart=always
95
-RestartSec=20
96
-LimitNOFILE=16384
97
-CPUAccounting=true
98
-MemoryAccounting=true
99
- 
100
-[Install]
101
-WantedBy=multi-user.target
102
-</source><br />
103
-Make sure you replace '''''–ip''''' setting on each master. So far we have 3 masters with a Zookeeper and Mesos packages installed. Let's start zookeeper and mesos-master services on each master:
104
-<source lang="bash" enclose="div">
105
-root@pt-mesos-master1 [ ~ ]# systemctl start zookeeper
106
-root@pt-mesos-master1 [ ~ ]# systemctl start mesos-master
107
-root@pt-mesos-master1 [ ~ ]# ps -ef | grep mesos
108
-root     11543     1  7 12:09 ?        00:00:01 /opt/OpenJDK-1.8.0.51-bin/bin/java -Dzookeeper.log.dir=. -Dzookeeper.root.logger=INFO,CONSOLE -cp /opt/mesosphere/zookeeper/bin/../build/classes:/opt/mesosphere/zookeeper/bin/../build/lib/*.jar:/opt/mesosphere/zookeeper/bin/../lib/slf4j-log4j12-1.6.1.jar:/opt/mesosphere/zookeeper/bin/../lib/slf4j-api-1.6.1.jar:/opt/mesosphere/zookeeper/bin/../lib/netty-3.7.0.Final.jar:/opt/mesosphere/zookeeper/bin/../lib/log4j-1.2.16.jar:/opt/mesosphere/zookeeper/bin/../lib/jline-0.9.94.jar:/opt/mesosphere/zookeeper/bin/../zookeeper-3.4.7.jar:/opt/mesosphere/zookeeper/bin/../src/java/lib/*.jar:/opt/mesosphere/zookeeper/bin/../conf: -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.local.only=false org.apache.zookeeper.server.quorum.QuorumPeerMain /opt/mesosphere/zookeeper/bin/../conf/zoo.cfg
109
-root     11581     1  0 12:09 ?        00:00:00 /usr/sbin/mesos-master --ip=192.168.0.1 --work_dir=/var/lib/mesos --log_dir=/var/lob/mesos --cluster=EXAMPLE --zk=zk://192.168.0.2:2181,192.168.0.1:2181,192.168.0.3:2181/mesos --quorum=2
110
-root     11601  9117  0 12:09 pts/0    00:00:00 grep --color=auto mesos
111
-</source><br />
112
-== Slaves Installation and Configuration ==
113
-The steps for configuring a Mesos slave are very simple and not very different from master installation. The difference is that we won't install zookeeper on each slave. We will also start the Mesos slaves in slave mode and will tell the daemon to join the Mesos masters. Do the following for each slave:
114
-<source lang="bash" enclose="div">
115
-root@pt-mesos-node1 [ ~ ]# cat /etc/systemd/system/mesos-slave.service
116
-[Unit]
117
-Description=Photon instance running as a Mesos slave
118
-After=network-online.target,docker.service
119
-  
120
-[Service]
121
-Restart=on-failure
122
-RestartSec=10
123
-TimeoutStartSec=0
124
-ExecStartPre=/usr/bin/rm -f /tmp/mesos/meta/slaves/latest
125
-ExecStart=/bin/bash -c "/usr/sbin/mesos-slave \
126
-    --master=zk://192.168.0.1:2181,192.168.0.2:2181,192.168.0.3:2181/mesos \
127
-        --hostname=$(/usr/bin/hostname) \
128
-        --log_dir=/var/log/mesos_slave \
129
-        --containerizers=docker,mesos \
130
-        --docker=$(which docker) \
131
-        --executor_registration_timeout=5mins \
132
-        --ip=192.168.0.4"
133
-  
134
-[Install]
135
-WantedBy=multi-user.target
136
-</source>
137
-Please make sure to replace the NIC name under '''''–ip''''' setting. Start the mesos-slave service on each node.
138
-<br />
139
-Now you should have ready Mesos cluster with 3 masters, 3 Zookeepers and 3 slaves.
140
-[[https://www.devops-experts.com/wp-content/uploads/2015/12/Screen-Shot-2015-12-24-at-2.22.27-PM.png]]
141
-<br />
142
-If you want to use private docker registry, you will need to edit docker systemd file. In my example I am using cse-artifactory.eng.vmware.com registry:
143
-<source lang="bash" enclose="div">
144
-root@pt-mesos-node1 [ ~ ]# cat /lib/systemd/system/docker.service
145
-[Unit]
146
-Description=Docker Daemon
147
-Wants=network-online.target
148
-After=network-online.target
149
-  
150
-[Service]
151
-EnvironmentFile=-/etc/sysconfig/docker
152
-ExecStart=/bin/docker -d $OPTIONS -s overlay
153
-ExecReload=/bin/kill -HUP $MAINPID
154
-KillMode=process
155
-Restart=always
156
-MountFlags=slave
157
-LimitNOFILE=1048576
158
-LimitNPROC=1048576
159
-LimitCORE=infinity
160
-  
161
-[Install]
162
-WantedBy=multi-user.target
163
-  
164
-root@pt-mesos-node1 [ ~ ]# cat /etc/sysconfig/docker
165
-OPTIONS='--insecure-registry cse-artifactory.eng.vmware.com'
166
-root@pt-mesos-node1 [ ~ ]# systemctl daemon-reload && systemctl restart docker
167
-root@pt-mesos-node1 [ ~ ]# ps -ef | grep cse-artifactory
168
-root      5286     1  0 08:39 ?        00:00:00 /bin/docker -d --insecure-registry <your_privet_registry> -s overlay
169
-</source><br />
170
-<br /><br />
171
-Next - [[Install and Configure Marathon for Mesos Cluster on PhotonOS]]
172 1
\ No newline at end of file
173 2
deleted file mode 100644
... ...
@@ -1,277 +0,0 @@
1
-<sub>Posted on January 13, 2016 by [https://il.linkedin.com/in/tgabay '''Tal Gabay''']</sub>
2
-
3
-= Overview =
4
-
5
-In this How-To, the steps for installing and configuring a Docker Swarm cluster, alongside DNS and Zookeeper, will be presented.
6
-The cluster that will be set up will be on VMware Photon hosts. <br />
7
-<br />
8
-A prerequisite to using this guide is to be familiar with Docker Swarm - information can be found [https://docs.docker.com/swarm/ here].
9
-
10
-== Cluster description ==
11
-
12
-The cluster will have 2 Swarm Managers and 3 Swarm Agents:
13
-
14
-=== Masters ===
15
-
16
-{| class="wikitable"
17
-! style="text-align: center; font-weight: bold;" | Hostname
18
-! style="font-weight: bold;" | IP Address
19
-|-
20
-| pt-swarm-master1.example.com
21
-| 192.168.0.1
22
-|-
23
-| pt-swarm-master2.example.com
24
-| 192.168.0.2
25
-|}
26
-
27
-=== Agents ===
28
-
29
-{| class="wikitable"
30
-! style="text-align: center; font-weight: bold; font-size: 0.100em;" | Hostname
31
-! style="font-weight: bold;" | IP Address
32
-|-
33
-| pt-swarm-agent1.example.com
34
-| 192.168.0.3
35
-|-
36
-| pt-swarm-agent2.example.com
37
-| 192.168.0.4
38
-|-
39
-| pt-swarm-agent3.example.com
40
-| 192.168.0.5
41
-|}<br />
42
-
43
-= Docker Swarm Installation and Configuration =
44
-
45
-== Setting Up the Managers ==
46
-
47
-The following steps should be done on both managers.<br />
48
-Docker Swarm supports multiple methods of using service discovery, but in order to use failover, Consul, etcd or Zookeeper must be used. In this guide, Zookeeper will be used.<br />
49
-Download the latest stable version of Zookeeper and create the '' zoo.cfg '' file under the '' conf '' directory:
50
-<br />
51
-<br />
52
-
53
-=== Zookeeper installation ===
54
-
55
-<source lang="bash" enclose="div">
56
-root@pt-swarm-master1 [ ~ ]# mkdir -p /opt/swarm && cd /opt/swarm && wget http://apache.mivzakim.net/zookeeper/stable/zookeeper-3.4.6.tar.gz
57
-root@pt-swarm-master1 [ /opt/swarm ]# tar -xf zookeeper-3.4.6.tar.gz && mv zookeeper-3.4.6 zookeeper
58
-root@pt-swarm-master1 [ ~ ]# cat /opt/swarm/zookeeper/conf/zoo.cfg | grep -v '#'
59
-tickTime=2000
60
-initLimit=10
61
-syncLimit=5
62
-dataDir=/var/lib/zookeeper
63
-clientPort=2181
64
-server.1=192.168.0.1:2888:3888
65
-server.2=192.168.0.2:2888:3888
66
-</source><br />
67
-The dataDir should be an empty, existing directory.
68
-From the Zookeeper documentation: Every machine that is part of the ZooKeeper ensemble should know about every other machine in the ensemble. You accomplish this with the series of lines of the form server.id=host:port:port. You attribute the server id to each machine by creating a file named myid, one for each server, which resides in that server's data directory, as specified by the configuration file parameter dataDir. The myid file consists of a single line containing only the text of that machine's id. So myid of server 1 would contain the text "1" and nothing else. The id must be unique within the ensemble and should have a value between 1 and 255.
69
-<br />
70
-<br />
71
-Set Zookeeper ID
72
-<source lang="bash" enclose="div">
73
-root@pt-swarm-master1 [ ~ ]# echo 1 > /var/lib/zookeeper/myid
74
-</source><br />
75
-Project Photon uses [https://en.wikipedia.org/wiki/Systemd Systemd] for services, so a zookeeper service should be created using systemd unit file.<br />
76
-<source lang="bash" enclose="div">
77
-root@pt-swarm-master1 [ ~ ]# cat /etc/systemd/system/zookeeper.service
78
-[Unit]
79
-Description=Apache ZooKeeper
80
-After=network.target
81
- 
82
-[Service]
83
-Environment="JAVA_HOME=/opt/OpenJDK-1.8.0.51-bin"
84
-WorkingDirectory=/opt/swarm/zookeeper
85
-ExecStart=/bin/bash -c "/opt/swarm/zookeeper/bin/zkServer.sh start-foreground"
86
-Restart=on-failure
87
-RestartSec=20
88
-User=root
89
-Group=root
90
- 
91
-[Install]
92
-WantedBy=multi-user.target
93
-</source><br />
94
-Zookeeper comes with OpenJDK, so having Java on the Photon host is not a prerequisite. Simply direct the Environment variable to the location where the Zookeeper was extracted.
95
-Now you need to enable and start the service. Enabling the service will make sure that if the host restarts for some reason, the service will automatically start.<br />
96
-<source lang="bash" enclose="div">
97
-root@pt-swarm-master1 [ ~ ]# systemctl enable zookeeper
98
-root@pt-swarm-master1 [ ~ ]# systemctl start zookeeper
99
-</source><br />
100
-Verify that the service was able to start:<br />
101
-<source lang="bash" enclose="div">
102
-root@pt-swarm-master1 [ ~ ]# systemctl status zookeeper
103
-zookeeper.service - Apache ZooKeeper
104
-   Loaded: loaded (/etc/systemd/system/zookeeper.service; enabled)
105
-   Active: active (running) since Tue 2016-01-12 00:27:45 UTC; 10s ago
106
- Main PID: 4310 (java)
107
-   CGroup: /system.slice/zookeeper.service
108
-           `-4310 /opt/OpenJDK-1.8.0.51-bin/bin/java -Dzookeeper.log.dir=. -Dzookeeper.root.logger=INFO,CONSOLE -cp /opt/swarm/zookeeper/bin/../build/classes:/opt/swarm/zookeeper/bin/../build/lib/*.jar:/opt/s...
109
-</source><br />
110
-On the Manager you elected to be the Swarm Leader (primary), execute the following (if you do not have a specific leader in mind, choose one of the managers randomly):
111
-<source lang="bash" enclose="div">
112
-root@pt-swarm-master1 [ ~ ]# docker run -d --name=manager1 -p 8888:2375 swarm manage --replication --advertise 192.168.0.1:8888 zk://192.168.0.1,192.168.0.2/swarm
113
-</source>
114
-* '' docker run -d ''- run the container in the background.
115
-* '' --name=manager1 ''- give the container a name instead of the auto-generated one.
116
-* '' -p 8888:2375 ''- publish a container's port(s) to the host. In this case, when you connect to the host in port 8888, it connects to the container in port 2375.
117
-* swarm - the image to use for the container.
118
-* manage - the command to send to the container once it's up, alongside the rest of the parameters.
119
-* '' --replication '' - tells swarm that the manager is part of a a multi-manager configuration and that this primary manager competes with other manager instances for the primary role. The primary manager has the authority to manage the cluster, replicate logs, and replicate events that are happening inside the cluster.
120
-* '' --advertise 192.168.0.1:8888 ''- specifies the primary manager address. Swarm uses this address to advertise to the cluster when the node is elected as the primary.
121
-* '' zk://192.168.0.1,192.168.0.2/swarm ''- specifies the Zookeepers' location to enable service discovery. The /swarm path is arbitrary, just make sure that every node that joins the cluster specifies that same path (it is meant to enable support for multiple clusters with the same Zookeepers).<br />
122
-<br />
123
-On the second manager, execute the following:
124
-<source lang="bash" enclose="div">
125
-root@pt-swarm-master2 [ ~ ]# docker run -d --name=manager2 -p 8888:2375 swarm manage --replication --advertise 192.168.0.2:8888 zk://192.168.0.1,192.168.0.2/swarm
126
-</source>
127
-Notice that the only difference is the --advertise flag value. The first manager will not lose leadership following this command.<br />
128
-<br />
129
-Now 2 managers are alive, one is the primary and another is the replica. When we now look at the docker info on our primary manager, we can see the following information:
130
-<source lang="bash" enclose="div">
131
-docker-client:~$ docker -H tcp://192.168.0.1:8888 info
132
-Containers: 0
133
-Images: 0
134
-Role: primary
135
-Strategy: spread
136
-Filters: health, port, dependency, affinity, constraint
137
-Nodes: 0
138
-CPUs: 0
139
-Total Memory: 0 B
140
-Name: 82b8516efb7c
141
-</source>
142
-There are a few things that are worth noticing:
143
-* The info command can be executed from ANY machine that can reach the master. The -H tcp://&lt;ip&gt;:&lt;port&gt; command specifies that the docker command should be executed on a remote host.
144
-* Containers - this is the result of the docker ps -a command for the cluster we just set up.
145
-* Images - the result of the docker images command.
146
-* Role - as expected, this is the primary manager.
147
-* Strategy - Swarm has a number of strategies it supports for setting up containers in the cluster. spread means that a new container will run on the node with the least amount of containers on it.
148
-* Filters - Swarm can choose where to run containers based on different filters supplied in the command line. More info can be found [https://docs.docker.com/swarm/scheduler/filter/ here].<br />
149
-<br />
150
-When we now look at the docker info on our replicated manager, we can see the following information:
151
-<source lang="bash" enclose="div">
152
-docker-client:~$ docker -H tcp://192.168.0.2:8888 info
153
-Containers: 0
154
-Images: 0
155
-Role: replica
156
-Primary: 192.168.0.1:8888
157
-Strategy: spread
158
-Filters: health, port, dependency, affinity, constraint
159
-Nodes: 0
160
-CPUs: 0
161
-Total Memory: 0 B
162
-Name: ac06f826e507
163
-</source>
164
-Notice that the only differences between both managers are:
165
-Role: as expected, this is the replicated manager.
166
-Primary: contains the primary manager.<br />
167
-<br />
168
-
169
-== Setting Up the Agents ==
170
-
171
-In Swarm, in order for a node to become a part of the cluster, it should "join" that said cluster - do the following for each of the agents.
172
-Edit the '' /usr/lib/systemd/system/docker.service '' file so that each agent will be able to join the cluster:
173
-<source lang="bash" enclose="div">
174
-root@pt-swarm-agent1 [ ~ ]# cat /usr/lib/systemd/system/docker.service
175
-[Unit]
176
-Description=Docker Daemon
177
-Wants=network-online.target
178
-After=network-online.target
179
- 
180
-[Service]
181
-ExecStart=/bin/docker daemon -H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock --cluster-advertise eno16777984:2375 --cluster-store zk://192.168.0.1,192.168.0.2/swarm
182
-ExecReload=/bin/kill -HUP $MAINPID
183
-KillMode=process
184
-Restart=always
185
-MountFlags=slave
186
-LimitNOFILE=1048576
187
-LimitNPROC=1048576
188
-LimitCORE=infinity
189
- 
190
-[Install]
191
-WantedBy=multi-user.target
192
-</source>
193
-* '' -H tcp://0.0.0.0:2375 ''- This ensures that the Docker remote API on Swarm Agents is available over TCP for the Swarm Manager.
194
-* '' -H unix:///var/run/docker.sock ''- The Docker daemon can listen for Docker Remote API requests via three different types of Socket: unix, tcp, and fd. 
195
-** tcp - If you need to access the Docker daemon remotely, you need to enable the tcp Socket.
196
-** fd - On Systemd based systems, you can communicate with the daemon via Systemd socket activation.
197
-* '' --cluster-advertise <NIC>:2375 ''- advertises the machine on the network by stating the ethernet card and the port used by the Swarm Managers.
198
-* '' --cluster-store zk://192.168.0.1,192.168.0.2/swarm ''- as we defined before, the service discovery being used here is Zookeeper.
199
-<br />
200
-Enable and start the docker service:
201
-<source lang="bash" enclose="div">
202
-root@pt-swarm-agent1 [ ~ ]# systemctl enable docker
203
-root@pt-swarm-agent1 [ ~ ]# systemctl daemon-reload && systemctl restart docker
204
-root@pt-swarm-agent1 [ ~ ]# systemctl status docker
205
-docker.service - Docker Daemon
206
-   Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled)
207
-   Active: active (running) since Tue 2016-01-12 00:46:18 UTC; 4s ago
208
- Main PID: 11979 (docker)
209
-   CGroup: /system.slice/docker.service
210
-           `-11979 /bin/docker daemon -H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock --cluster-advertise eno16777984:2375 --cluster-store zk://192.168.0.1,192.168.0.2/swarm
211
-</source><br />
212
-All that remains is to have the agents join the cluster:
213
-<source lang="bash" enclose="div">
214
-root@pt-swarm-agent1 [ ~ ]# docker run -d swarm join --advertise=192.168.0.3:2375 zk://192.168.0.1,192.168.0.2/swarm
215
-</source><br />
216
-A look at the output of the docker info command will now show:
217
-<source lang="bash" enclose="div">
218
-docker-client:~$ docker -H tcp://192.168.0.1:8888 info
219
-Containers: 3
220
-Images: 9
221
-Role: primary
222
-Strategy: spread
223
-Filters: health, port, dependency, affinity, constraint
224
-Nodes: 3
225
- pt-swarm-agent1.example.com: 192.168.0.3:2375
226
-  └ Status: Healthy
227
-  └ Containers: 1
228
-  └ Reserved CPUs: 0 / 1
229
-  └ Reserved Memory: 0 B / 2.055 GiB
230
-  └ Labels: executiondriver=native-0.2, kernelversion=4.1.3-esx, operatingsystem=VMware Photon/Linux, storagedriver=overlay
231
- pt-swarm-agent2.example.com: 192.168.0.4:2375
232
-  └ Status: Healthy
233
-  └ Containers: 1
234
-  └ Reserved CPUs: 0 / 1
235
-  └ Reserved Memory: 0 B / 2.055 GiB
236
-  └ Labels: executiondriver=native-0.2, kernelversion=4.1.3-esx, operatingsystem=VMware Photon/Linux, storagedriver=overlay
237
- pt-swarm-agent3.example.com: 192.168.0.5:2375
238
-  └ Status: Healthy
239
-  └ Containers: 1
240
-  └ Reserved CPUs: 0 / 1
241
-  └ Reserved Memory: 0 B / 2.055 GiB
242
-  └ Labels: executiondriver=native-0.2, kernelversion=4.1.3-esx, operatingsystem=VMware Photon/Linux, storagedriver=overlay
243
-CPUs: 3
244
-Total Memory: 6.166 GiB
245
-Name: 82b8516efb7c
246
-</source>
247
-
248
-== Setting Up DNS ==
249
-
250
-Docker does not have its own self-provided DNS so we use a [https://github.com/ahmetalpbalkan/wagl wagl] DNS.
251
-Setting it up is very simple. In this case, one of the masters will also be the DNS. Simply execute:
252
-<source lang="bash" enclose="div">
253
-docker-client:~$ docker run -d --restart=always --name=dns -p 53:53/udp --link manager1:swarm ahmet/wagl wagl --swarm tcp://swarm:2375
254
-</source>
255
-* '' --restart=always ''- Always restart the container regardless of the exit status. When you specify always, the Docker daemon will try to restart the container continuously. The container will also always start on daemon startup, regardless of the current state of the container.
256
-* '' --link manager1:swarm ''- link the manager1 container (by name) and give it the alias swarm.
257
-That's it, DNS is up and running.
258
-
259
-= Test Your Cluster =
260
-
261
-== Running Nginx ==
262
-
263
-Execute the following commands from any docker client:
264
-<source lang="bash" enclose="div">
265
-docker-client:~$ docker -H tcp://192.168.0.1:8888 run -d -l dns.service=api -l dns.domain=example -p 80:80 vmwarecna/nginx
266
-docker-client:~$ docker -H tcp://192.168.0.1:8888 run -d -l dns.service=api -l dns.domain=example -p 80:80 vmwarecna/nginx
267
-</source>
268
-Note that this is the same command, executed twice. It tells the master to run 2 of the similar containers, each of which has 2 dns labels.<br />
269
-Now, from any container in the cluster that has dnsutils, you can execute the following (for example):
270
-<source lang="bash" enclose="div">
271
-root@13271a2d0fcb:/# dig +short A api.example.swarm
272
-192.168.0.3
273
-192.168.0.4
274
-root@13271a2d0fcb:/# dig +short SRV _api._tcp.example.swarm
275
-1 1 80 192.168.0.3.
276
-1 1 80 192.168.0.4.
277
-</source>
278 1
\ No newline at end of file
279 2
deleted file mode 100644
... ...
@@ -1,38 +0,0 @@
1
-**Installing the Lightwave Client on a Photon Image and Joining the Client to a Domain**
2
-
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
-
5
-**Prerequisites**
6
-
7
-- Prepare a Photon OS client for the Lightwave client installation.
8
-- Verify that the hostname of the client can be resolved.
9
-- Verify that you have 184 MB free for the Lightwave client installation.
10
-
11
-**Procedure**
12
-
13
-1. Log in to your Photon OS client over SSH.
14
-2. Install the Lightwave client by running the following command. 
15
-	
16
-	`# tdnf install lightwave-client -y`
17
-
18
-3. Edit the `iptables` firewall rules configuration file to allow connections on port `2020` as a default setting.
19
-	
20
-	The default Photon OS 2.0 firewall settings block all incoming, outgoing, and forwards so that you must configure the rules.
21
-
22
-	1. Open the  iptables settings file.
23
-	
24
-	`# vi /etc/systemd/scripts/iptables`
25
-
26
-	2. Add allow information over tcp for port 2020 in the end of the file, save, and close the file.
27
-
28
-	`iptables -A INPUT -p tcp -m tcp --dport 2020 -j ACCEPT`
29
-
30
-	3. Run the following command to allow the required connections without restarting the client.
31
-
32
-	`# iptables -A INPUT -p tcp -m tcp --dport 2020 -j ACCEPT`
33
-
34
-4. Join the client to the domain by running the `domainjoin.sh` script and configuring the domain controller FQDN, domain, and the password for the `administrator` user.
35
-
36
-	`# domainjoin.sh --domain-controller <lightwave-server-FQDN> --domain <your-domain> --password '<administrator-user-password>`
37
-
38
-5. In a browser, go to https://*Lightwave-Server-FQDN* to verify that the client appears under the tenants list for the domain.
39 1
\ No newline at end of file
40 2
deleted file mode 100644
... ...
@@ -1,34 +0,0 @@
1
-**Installing the Lightwave Server and Configuring It as a Domain Controller on a Photon Image**
2
-
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
-
5
-**Prerequisites**
6
-
7
-- Prepare a Photon OS client for the Lightwave server installation.
8
-- Verify that the hostname of the client can be resolved.
9
-- Verify that you have 500 MB free for the Lightwave server installation.
10
-
11
-**Procedure**
12
-
13
-1. Log in to your Photon OS client over SSH as an administrator.
14
-2. Install the Lightwave server by running the following command. 
15
-	
16
-	`# tdnf install lightwave -y`
17
-3. Configure the Lightwave server as domain controller by selecting a domain name and password for the `administrator` user.
18
-	
19
-	The minimum required password complexity is 8 characters, one symbol, one upper case letter, and one lower case letter. 
20
-	Optionally, if you want to access the domain controller over IP, configure the ip under the `--ssl-subject-alt-name` parameter.
21
-	`# configure-lightwave-server --domain <your-domain> --password '<administrator-user-password>' --ssl-subject-alt-name <machine-ip-address>`
22
-4. Edit `iptables` rules to allow connections to and from the client.
23
-
24
-	The default Photon OS 2.0 firewall settings block all incoming, outgoing, and forwards so that you must reconfigure them.
25
-	
26
-	`# iptables -P INPUT ACCEPT`
27
-
28
-	`# iptables -P OUTPUT ACCEPT`
29
-
30
-	`# iptables -P FORWARD ACCEPT`
31
-
32
-5. In a browser, go to https://*lightwave-server-FQDN* to verify that you can log in to the newly created domain controller.
33
-	1. On the Cascade Identity Services page, enter the domain that you configured and click **Take me to Lightwave Admin**.
34
-	2. On the Welcome page, enter administrator@your-domain as user name and the password that you set during the domain controller configuration and click **LOGIN**.
35 1
\ No newline at end of file
36 2
deleted file mode 100644
... ...
@@ -1,11 +0,0 @@
1
-# Installing and Using Lightwave on Photon OS #
2
-
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
-
5
-**Procedure**
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)
12 1
deleted file mode 100644
... ...
@@ -1,35 +0,0 @@
1
-**Installing the Photon Management Daemon on a Lightwave Client**
2
-
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
-
5
-**Prerequisites**
6
-
7
-- Have an installed Lightwave server with configured domain controller on it.
8
-- Have an installed Lightwave client that is joined to the domain.
9
-- Verify that you have 100 MB free for the daemon installation on the client.
10
-
11
-**Procedure**
12
-
13
-1. Log in to a machine with installed Lightwave client over SSH as an administrator.
14
-2. Install the Photon Management Daemon.
15
-	
16
-	`# tdnf install pmd -y`
17
-2. Start the Photon Management Daemon.
18
-	 
19
-	`# systemctl start pmd`
20
-3. Verify that the daemon is in an `active` state.
21
-
22
-	`# systemctl status pmd`
23
-4. (Optional) In a new console, use `curl` to verify that the Photon Management Daemon returns information.
24
-
25
-	Use the root credentials for the local client to authenticate against the daemon service.
26
-	`# curl https://<lightwave-client-FQDN>:2081/v1/info -ku root`
27
-
28
-5. (Optional) Create an administrative user for the Photon Management Daemon for your domain and assign it the domain administrator role.
29
-	1. In a browser, go to https://*lightwave-server-FQDN*.
30
-	1. On the Cascade Identity Services page, enter your domain name and click **Take me to Lightwave Admin**.
31
-	2. On the Welcome page, enter administrative credentials for your domain and click **Login**.
32
-	2. Click **Users & Groups** and click **Add** to create a new user.
33
-	3. On the Add New User page, enter user name, at least one name, password, and click **Save**.
34
-	3. Click the **Groups** tab, select the Administrators group, and click  **Membership**  to add the new user to the group.
35
-	4. On the View Members page, select the user that you created, click **Add Member**, click **Save**, and click **Cancel** to return to the previous page.
36 1
\ No newline at end of file
37 2
deleted file mode 100644
... ...
@@ -1,13 +0,0 @@
1
-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
-
3
-https://github.com/vmware/photon/blob/master/docs/photon-admin-guide.md
4
-
5
-The Photon OS Troubleshooting Guide describes the fundamentals of troubleshooting problems on Photon OS. This guide covers the basics of troubleshooting systemd, packages, network interfaces, services such as SSH and Sendmail, the file system, and the Linux kernel. The guide includes a quick tour of the tools that you can use for troubleshooting and provides examples along the way. The guide also demonstrates how to access the system's log files. It is at the following URL:
6
-
7
-https://github.com/vmware/photon/blob/master/docs/photon-os-troubleshooting-guide.md 
8
-
9
-Additional documentation appears in the docs directory of the Photon OS GitHub:
10
-
11
-https://github.com/vmware/photon/tree/master/docs
12
-
13
-
14 1
deleted file mode 100644
... ...
@@ -1,52 +0,0 @@
1
-### 1.1 What is OSTree? How about RPM-OSTree?
2
-
3
-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
-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
-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
-You may read more about OSTree [here](https://wiki.gnome.org/Projects/OSTree).
7
-
8
-### 1.2 Why use RPM-OSTree in Photon?
9
-There are several important benefits:
10
-* 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
-* 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.
12
-* Manageable: You are provided simple tools to figure out exactly what packages have been installed, to compare files, configuration and package changes between versions.
13
-* Predictable, repeatable: A big headache for a system administrator is to maintain a farm of computers with different packages, files and configuration installed in different order, that will result in exponential set of test cases. With RPM-OStree, you get identical, predictable installed systems. 
14
-
15
-As drawbacks, I would mention:
16
-* Some applications configured by user on host may have compatibility issues if they save configuration or download into read only directories like /usr.
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
-* Administrators need to be aware about the directories re-mapping specific to OSTree and plan accordingly.
19
-
20
-### 1.3 Photon with RPM-OSTree installation profiles
21
-Photon takes advantage of RPM-OSTree and offers several installation choices:
22
-* Photon RPM-OSTree server - used to compose customized Photon OS installations and to prepare updates. I will call it for short 'server'.
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
-* 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
-
26
-### 1.4 Terminology
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
-When "ostree" and "rpm-ostree" (in small letters) are encountered, they refer to the usage of the specific Unix commands.   
29
-
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
-
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). 
34
-The samples assume that the following VMs have been installed - see the steps in the next chapters:
35
-* A default host VM named **photon-host-def**.
36
-* Two server VMs named **photon-srv1** and **photon-srv2**.
37
-* Two custom host VMs named **photon-host-cus1** and **photon-host-cus2**, connected each to the corresponding server during install.
38
-
39
-### 1.6 How to read this book
40
-I've tried to structure this book to be used both as a sequential read and as a reference documentation.   
41
-If you are just interested in deploying a host system and keeping it up to date, then read chapters 2 and 5.   
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
-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
-
45
-### 1.7 Difference between versions
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
-
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.    
49
-
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 1
\ No newline at end of file
54 2
deleted file mode 100644
... ...
@@ -1,89 +0,0 @@
1
-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
-
3
-### 10.1 Listing remotes
4
-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
-```
6
-root@photon-host-def [ ~ ]# ostree remote list
7
-photon
8
-```
9
-We can inquiry about the URL for that remote name, which for the default host is the expected Photon OS online OSTree repo.
10
-```
11
-root@photon-host-def [ ~ ]# ostree remote show-url photon
12
-https://dl.bintray.com/vmware/photon/rpm-ostree/1.0
13
-```
14
-But where is this information stored? The repo's config file has it.
15
-```
16
-root@photon-host-def [ ~ ]# cat /ostree/repo/config 
17
-[core]
18
-repo_version=1
19
-mode=bare
20
-
21
-[remote "photon"]
22
-url=https://dl.bintray.com/vmware/photon/rpm-ostree/1.0
23
-gpg-verify=false
24
-```
25
-
26
-If same command is executed on the custom host we've installed, it's going to reveal the URL of the Photon RPM-OSTree server connected to during setup.
27
-```
28
-root@photon-host-cus [ ~ ]# ostree remote show-url photon
29
-http://10.118.101.168
30
-```
31
-
32
-### 10.2 GPG signature verification
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
-
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
-
37
-
38
-### 10.3 Switching repositories
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
-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
-This may create confusion and it's one of the reasons I insisted on creating your own scheme of versioning.
42
-  
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
-A better solution would be to add a new remote that will identify where the commits come from.
45
-
46
-### 10.4 Adding and removing remotes
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. 
49
-```
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
-root@photon-host-cus [ ~ ]# ostree remote list
52
-photon
53
-photon2
54
-root@photon-host-cus [ ~ ]# ostree remote show-url photon2
55
-http://10.118.101.86
56
-```
57
-Where is this information stored? There is an extra config file created per each remote:
58
-```
59
-root@photon-host-cus [ ~ ]# cat /etc/ostree/remotes.d/photon2.conf 
60
-[remote "photon2"]
61
-url=http://10.118.101.86
62
-branches=photon/2.0/x86_64/minimal;photon/2.0/x86_64/full;
63
-gpg-verify=false
64
-```
65
-You may have guessed what is the effect of ```--no-gpg-verify option```.  
66
-Obviously, remotes could also be deleted.
67
-```
68
-root@photon-host-cus [ ~ ]# ostree remote delete photon2
69
-root@photon-host-cus [ ~ ]# ostree remote list
70
-photon
71
-```
72
-
73
-### 10.5 List available branches
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
-
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**.
77
-
78
-```
79
-root@photon-host-cus [ ~ ]# ostree remote refs photon2 
80
-photon2:photon/2.0/x86_64/base
81
-photon2:photon/2.0/x86_64/full
82
-photon2:photon/2.0/x86_64/minimal
83
-```
84
-
85
-###10.6 Switching branches (rebasing)
86
-
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
-  
90 1
deleted file mode 100644
... ...
@@ -1,211 +0,0 @@
1
-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
-We are going to do this twice: first, to verify an existing bootable image installed in parallel and then create a new one.
3
-
4
-### 11.1 Downloading a docker container appliance
5
-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
-```
7
-root@sample-host-def [ ~ ]# systemctl status docker
8
-* docker.service - Docker Daemon
9
-   Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled)
10
-   Active: inactive (dead)
11
-
12
-root@sample-host-def [ ~ ]# cat /usr/lib/systemd/system/docker.service
13
-[Unit]
14
-Description=Docker Daemon
15
-Wants=network-online.target
16
-After=network-online.target
17
-
18
-[Service]
19
-ExecStart=/bin/docker -d -s overlay
20
-ExecReload=/bin/kill -HUP $MAINPID
21
-KillMode=process
22
-Restart=always
23
-MountFlags=slave
24
-LimitNOFILE=1048576
25
-LimitNPROC=1048576
26
-LimitCORE=infinity
27
-
28
-[Install]
29
-WantedBy=multi-user.target
30
-```
31
-Now let's enable docker daemon to start at boot time - this will create a symbolic link into writable folder /etc/systemd/system/multi-user.target.wants to its systemd configuration, as with all other systemd controlled services. 
32
-```
33
-root@sample-host-def [ ~ ]# systemctl enable docker
34
-Created symlink from /etc/systemd/system/multi-user.target.wants/docker.service to /usr/lib/systemd/system/docker.service.
35
-
36
-root@sample-host-def [ ~ ]# ls -l /etc/systemd/system/multi-user.target.wants
37
-total 0
38
-lrwxrwxrwx 1 root root 38 Sep  6 08:38 docker.service -> /usr/lib/systemd/system/docker.service
39
-lrwxrwxrwx 1 root root 47 Aug 28 20:21 iptables.service -> ../../../../lib/systemd/system/iptables.service
40
-lrwxrwxrwx 1 root root 47 Aug 28 20:21 remote-fs.target -> ../../../../lib/systemd/system/remote-fs.target
41
-lrwxrwxrwx 1 root root 50 Aug 28 20:21 sshd-keygen.service -> ../../../../lib/systemd/system/sshd-keygen.service
42
-lrwxrwxrwx 1 root root 43 Aug 28 20:21 sshd.service -> ../../../../lib/systemd/system/sshd.service
43
-lrwxrwxrwx 1 root root 55 Aug 28 20:21 systemd-networkd.service -> ../../../../lib/systemd/system/systemd-networkd.service
44
-lrwxrwxrwx 1 root root 55 Aug 28 20:21 systemd-resolved.service -> ../../../../lib/systemd/system/systemd-resolved.service
45
-```
46
-To verify that the symbolic link points to a file in a read-only directory, try to make a change in this file using vim and save. you'll get an error: "/usr/lib/systemd/system/docker.service" E166: Can't open linked file for writing".  
47
-Finally, let's start the daemon, check again that is active. 
48
-```
49
-root@sample-host-def [ ~ ]# systemctl start docker
50
-
51
-root@sample-host-def [ ~ ]# systemctl status -l docker
52
-* docker.service - Docker Daemon
53
-   Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled)
54
-   Active: active (running) since Sun 2015-09-06 08:56:30 UTC; 42s ago
55
- Main PID: 349 (docker)
56
-   CGroup: /system.slice/docker.service
57
-           `-349 /bin/docker -d -s overlay
58
-
59
-Sep 06 08:56:30 sample-host-def docker[349]: Warning: '-d' is deprecated, it will be removed soon. See usage.
60
-Sep 06 08:56:30 sample-host-def docker[349]: time="2015-09-06T08:56:30Z" level=warning msg="please use 'docker daemon' instead."
61
-Sep 06 08:56:30 sample-host-def docker[349]: time="2015-09-06T08:56:30.617969465Z" level=info msg="Option DefaultDriver: bridge"
62
-Sep 06 08:56:30 sample-host-def docker[349]: time="2015-09-06T08:56:30.618264109Z" level=info msg="Option DefaultNetwork: bridge"
63
-Sep 06 08:56:30 sample-host-def docker[349]: time="2015-09-06T08:56:30.632397533Z" level=info msg="Listening for HTTP on unix (/var/run/docker.sock)"
64
-Sep 06 08:56:30 sample-host-def docker[349]: time="2015-09-06T08:56:30.637516253Z" level=info msg="Firewalld running: false"
65
-Sep 06 08:56:30 sample-host-def docker[349]: time="2015-09-06T08:56:30.786748372Z" level=info msg="Loading containers: start."
66
-Sep 06 08:56:30 sample-host-def docker[349]: time="2015-09-06T08:56:30.787252697Z" level=info msg="Loading containers: done."
67
-Sep 06 08:56:30 sample-host-def docker[349]: time="2015-09-06T08:56:30.787410576Z" level=info msg="Daemon has completed initialization"
68
-Sep 06 08:56:30 sample-host-def docker[349]: time="2015-09-06T08:56:30.787610148Z" level=info msg="Docker daemon" commit=d12ea79 execdriver=native-0.2 graphdriver=overlay version=1.8.1
69
-```
70
-We'll ask docker to run Ubuntu Linux in a container. Since it's not present locally, it's going to be downloaded first from the official docker repository https://hub.docker.com/_/ubuntu/.
71
-```
72
-root@sample-host-def [ ~ ]# docker ps -a
73
-CONTAINER ID        IMAGE            COMMAND      CREATED           STATUS              PORTS       NAMES
74
-
75
-root@sample-host-def [ ~ ]# docker run -it ubuntu
76
-Unable to find image 'ubuntu:latest' locally
77
-latest: Pulling from library/ubuntu
78
-d3a1f33e8a5a: Downloading [=========================================>         ] 54.55 MB/65.79 MB
79
-c22013c84729: Download complete 
80
-d74508fb6632: Download complete 
81
-91e54dfb1179: Download complete 
82
-```
83
-When downloading is complete, it comes to Ubuntu root prompt with assigned host name d07ebca78051, that is actually the Container ID. Let's verify it's indeed the expected OS.
84
-```
85
-root@sample-host-def [ ~ ]# docker run -it ubuntu
86
-Unable to find image 'ubuntu:latest' locally
87
-latest: Pulling from library/ubuntu
88
-d3a1f33e8a5a: Pull complete 
89
-c22013c84729: Pull complete 
90
-d74508fb6632: Pull complete 
91
-91e54dfb1179: Already exists 
92
-library/ubuntu:latest: The image you are pulling has been verified. Important: image verification is a tech preview feature and should not be relied on to provide security.
93
-Digest: sha256:fde8a8814702c18bb1f39b3bd91a2f82a8e428b1b4e39d1963c5d14418da8fba
94
-Status: Downloaded newer image for ubuntu:latest
95
-
96
-root@d07ebca78051:/# cat /etc/os-release
97
-NAME="Ubuntu"
98
-VERSION="14.04.3 LTS, Trusty Tahr"
99
-ID=ubuntu
100
-ID_LIKE=debian
101
-PRETTY_NAME="Ubuntu 14.04.3 LTS"
102
-VERSION_ID="14.04"
103
-HOME_URL="http://www.ubuntu.com/"
104
-SUPPORT_URL="http://help.ubuntu.com/"
105
-BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
106
-root@d07ebca78051:/#
107
-```
108
-Now let's write a file into Ubuntu home directory
109
-```
110
-echo "Ubuntu file" > /home/myfile
111
-root@d07ebca78051:/home# cat /home/myfile
112
-Ubuntu file
113
-```
114
-We'll exit back to the Photon prompt and if it's stopped, we will re-start it.
115
-```
116
-root@d07ebca78051:/# exit
117
-exit
118
-
119
-root@sample-host-def [ ~ ]# docker ps -a
120
-CONTAINER ID    IMAGE   COMMAND       CREATED         STATUS                      PORTS   NAMES
121
-d07ebca78051    ubuntu  "/bin/bash"   3 minutes ago   Exited (0) 13 seconds ago           kickass_hodgkin
122
-
123
-root@photon-host-cus1 [ ~ ]# docker start  d07ebca78051
124
-d07ebca78051
125
-
126
-root@photon-host-cus1 [ ~ ]# docker ps -a
127
-CONTAINER ID    IMAGE   COMMAND       CREATED         STATUS                      PORTS   NAMES
128
-d07ebca78051    ubuntu  "/bin/bash"   16 minutes ago  Up 5 seconds                        kickass_hodgkin
129
-```
130
-
131
-### 11.2 Rebooting into an existing image
132
-Now let's reboot the machine and select the other image. First, we'll verify that the docker daemon is automaically started.
133
-```
134
-root@photon-host-cus1 [ ~ ]# systemctl status docker
135
-* docker.service - Docker Daemon
136
-   Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled)
137
-   Active: active (running) since Sun 2015-09-06 11:19:05 UTC; 2min 9s ago
138
- Main PID: 292 (docker)
139
-   CGroup: /system.slice/docker.service
140
-           `-292 /bin/docker -d -s overlay
141
-   ...
142
-```
143
-Next, is the Ubuntu OS container still there?
144
-```
145
-root@photon-host-cus1 [ ~ ]# docker ps -a 
146
-CONTAINER ID    IMAGE     COMMAND      CREATED          STATUS                     PORTS   NAMES
147
-57dcac5d0490    ubuntu    "/bin/bash"  25 minutes ago   Exited (137) 5 minutes ago         sad_banach
148
-```
149
-It is, so let's start it, attach and verify that our file is persisted, then add another line to it and save, exit.
150
-```
151
-root@photon-host-cus1 [ ~ ]# docker start -i  57dcac5d0490
152
-root@57dcac5d0490:/# cat /home/myfile 
153
-Ubuntu file
154
-root@57dcac5d0490:/# echo "booted into existing image" >> /home/myfile
155
-root@57dcac5d0490:/# exit
156
-```
157
-### 11.3 Reboot into a newly created image
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
-```
160
-root@photon-host-cus1 [ ~ ]# rpm-ostree status
161
-  TIMESTAMP (UTC)         VERSION               ID             OSNAME     REFSPEC                              
162
-* 2015-09-04 00:36:37     1.0_tp2_minimal.2     092e21d292     photon     photon:photon/tp2/x86_64/minimal     
163
-  2015-08-20 22:27:43     1.0_tp2_minimal       2940e10c4d     photon     photon:photon/tp2/x86_64/minimal     
164
-
165
-root@photon-host-cus1 [ ~ ]# rpm-ostree upgrade
166
-Updating from: photon:photon/tp2/x86_64/minimal
167
-
168
-43 metadata, 209 content objects fetched; 19992 KiB transferred in 0 seconds
169
-Copying /etc changes: 5 modified, 0 removed, 19 added
170
-Transaction complete; bootconfig swap: yes deployment count change: 0
171
-Freed objects: 16.2 MB
172
-Added:
173
-  git-2.1.2-1.ph1tp2.x86_64
174
-  perl-YAML-1.14-1.ph1tp2.noarch
175
-Upgrade prepared for next boot; run "systemctl reboot" to start a reboot
176
-
177
-root@photon-host-cus1 [ ~ ]# rpm-ostree status
178
-  TIMESTAMP (UTC)         VERSION               ID             OSNAME     REFSPEC                              
179
-  2015-09-06 18:12:08     1.0_tp2_minimal.3     d16aebd803     photon     photon:photon/tp2/x86_64/minimal     
180
-* 2015-09-04 00:36:37     1.0_tp2_minimal.2     092e21d292     photon     photon:photon/tp2/x86_64/minimal  
181
-```
182
-After reboot from 1.0_tp2_minimal.3 build, let's check that the 3-way /etc merge succeeded as expected. The docker.service slink is still there, and docker demon restarted at boot.
183
-```
184
-root@photon-host-cus1 [ ~ ]# ls -l /etc/systemd/system/multi-user.target.wants/docker.service 
185
-lrwxrwxrwx 1 root root 38 Sep  6 12:50 /etc/systemd/system/multi-user.target.wants/docker.service -> /usr/lib/systemd/system/docker.service
186
-
187
-root@photon-host-cus1 [ ~ ]# systemctl status docker
188
-* docker.service - Docker Daemon
189
-   Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled)
190
-   Active: active (running) since Sun 2015-09-06 12:56:33 UTC; 1min 27s ago
191
- Main PID: 292 (docker)
192
-   CGroup: /system.slice/docker.service
193
-           `-292 /bin/docker -d -s overlay
194
-
195
-   ...   
196
-```  
197
-Let's revisit the Ubuntu container. Is the container still there? is myfile persisted?
198
-```
199
-root@photon-host-cus1 [ ~ ]# docker ps -a
200
-CONTAINER ID   IMAGE       COMMAND      CREATED       STATUS                        PORTS   NAMES
201
-57dcac5d0490   ubuntu      "/bin/bash"  2 hours ago   Exited (0) About an hour ago          sad_banach
202
-
203
-root@photon-host-cus1 [ ~ ]# docker start 57dcac5d0490
204
-
205
-root@57dcac5d0490:/# cat /home/myfile
206
-Ubuntu file
207
-booted into existing image
208
-root@57dcac5d0490:/# echo "booted into new image" >> /home/myfile
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 1
\ No newline at end of file
213 2
deleted file mode 100644
... ...
@@ -1,38 +0,0 @@
1
-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
-Photon OS 2.0 does not offer a 'default host' installation. See chapter 7 and 12 for other options. 
3
-
4
-### 2.1 Who is this for?  
5
-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
-
7
-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
-
9
-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
-
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
-
14
-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
-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
-
17
-[[Running Project Photon on Fusion|Running-Project-Photon-on-Fusion]].  
18
-
19
-Select the **Photon OSTree Host** option.
20
-
21
-![PhotonChooseHost](https://cloud.githubusercontent.com/assets/13158414/14757883/15742dce-08ad-11e6-9486-4fe08b4bf7f2.png)  
22
-
23
-Continue with setting up a host name like **photon1-def** and a root password, re-confirm.   
24
-Then, select "Default OSTree Server" and continue.  
25
-
26
-![PhotonChooseHostDefault](https://cloud.githubusercontent.com/assets/13158414/14757878/1557500a-08ad-11e6-9cb7-f917cb0fdaca.png)
27
-
28
-![PhotonHostDefaultFinish](https://cloud.githubusercontent.com/assets/13158414/14757882/1571cde0-08ad-11e6-8e07-47258ca4e8d9.png)  
29
-
30
-When installation is over, the VM will reboot and will show in grub VMWare Photon/Linux 1.0_minimal (ostree), which will reassure that it's booting from an OSTree image!  
31
-
32
-![PhotonHostFirstRebootGrub](https://cloud.githubusercontent.com/assets/13158414/14757877/155614ec-08ad-11e6-9e36-b43f77b6fb69.png)  
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]].  
37
-
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 1
\ No newline at end of file
40 2
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
deleted file mode 100644
... ...
@@ -1,506 +0,0 @@
1
-### 5.1 Is it an update or an upgrade?
2
-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
-
4
-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.
5
-
6
-In fact, ostree and rpm-ostree commands support a single "upgrade" verb for a file image tree and a package list in the same refspec (branch). ```rpm-ostree upgrade``` will install a package if it doesn't exist, will not touch it if it has same version in the new image, will upgrade it if the version number is higher and it may actually downgrade it, if the package has been downgraded in the new image. I wish this operation had a different name, to avoid any confusion.
7
-
8
-The reverse operation of an upgrade is a "rollback" and fortunately it's not named "downgrade" because it may upgrade packages in the last case describe above.
9
-
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
-
12
-
13
-### 5.2 Incremental upgrade
14
-To check if there are any updates available, one would execute:
15
-```
16
-root@photon-host-def [ ~ ]# rpm-ostree upgrade
17
-Updating from: photon:photon/1.0/x86_64/minimal
18
-
19
-
20
-No upgrade available.
21
-```  
22
-It's good idea to check periodically for updates. In fact, VMware released in July 2016 Photon OS 1.0 Revision 2, that included an ISO containing an updated OSTree repo, mirrored online at same bintray site location. The updated OSTree repo contains new versions all packages that have been updated between since the 1.0 GA (general availability) in September 2015.  
23
-
24
-To simplify our example, let's assume that an updated Photon OS release for this branch (Refspec) contains three new packages: **gawk**, **sudo** and **wget**.
25
-To check if there are any new updates without actually applying them, we will pass the --check-diff flag, that would list the different packages as added, modified or deleted - if such operations were to happen.
26
-```
27
-root@photon-host [ ~ ]# rpm-ostree upgrade --check-diff
28
-Updating from: photon:photon/1.0/x86_64/minimal
29
-
30
-8 metadata, 13 content objects fetched; 1026 KiB transferred in 0 seconds
31
-+gawk-4.1.3-2.ph1.x86_64
32
-+sudo-1.8.15-3.ph1.x86_64
33
-+wget-1.17.1-2.ph1.x86_64
34
-```
35
-
36
-We like what we see and now let's upgrade for real. This command will deploy a new bootable filetree. 
37
-```
38
-root@photon-host [ ~ ]# rpm-ostree upgrade             
39
-Updating from: photon:photon/1.0/x86_64/minimal
40
-
41
-98 metadata, 189 content objects fetched; 14418 KiB transferred in 0 seconds
42
-Copying /etc changes: 6 modified, 0 removed, 16 added
43
-Transaction complete; bootconfig swap: yes deployment count change: 1
44
-Added:
45
-  gawk-4.1.3-2.ph1.x86_64
46
-  sudo-1.8.15-3.ph1.x86_64
47
-  wget-1.17.1-2.ph1.x86_64
48
-Upgrade prepared for next boot; run "systemctl reboot" to start a reboot
49
-```
50
-By looking at the commit history, notice that the new commit has the original commit as parent. 
51
-```
52
-root@photon-host [ ~ ]# ostree log photon/1.0/x86_64/minimal
53
-commit 184d9bbcecd4e8401d4a5073a248082f7a8888d232ef9678b6942002547a14e3
54
-Date:  2016-06-13 22:23:25 +0000
55
-Version: 1.0_minimal.1
56
-
57
-
58
-commit 56ef687f1319604b7900a232715718d26ca407de7e1dc89251b206f8e255dcb4
59
-Date:  2016-06-07 14:06:17 +0000
60
-Version: 1.0_minimal 
61
-```
62
-
63
-Notice that now we have a new reference, that corresponds to the newly deployed image.
64
-```
65
-root@photon-host [ ~ ]# ostree refs
66
-ostree/1/1/0
67
-ostree/1/1/1
68
-photon:photon/1.0/x86_64/minimal
69
-```
70
-
71
-Let's look at the status. The new filetree version .1 has the expected Commit ID and a newer timestamp, that is actually the server date/time when the image has been generated, not the time/date when it was downloaded or installed at the host. The old image has a star next to it, showing that's the image the system is booted currently into. 
72
-```
73
-root@photon-host [ ~ ]# rpm-ostree status
74
-  TIMESTAMP (UTC)        VERSION          ID            OSNAME    REFSPEC                              
75
-  2016-06-13 22:23:25    1.0_minimal.1    184d9bbcec    photon    photon:photon/1.0/x86_64/minimal     
76
-* 2016-06-07 14:06:17    1.0_minimal      56ef687f13    photon    photon:photon/1.0/x86_64/minimal     
77
-```
78
-
79
-Now let's type 'reboot'. Grub will list the new filetree as the first image, marked with a star, as the default bootable image. If the keyboard is not touched and order is not changed, grub will timeout and will boot into that image.
80
-
81
-![Grub-dual-boot-1-0](https://cloud.githubusercontent.com/assets/13158414/16056451/68275a40-322a-11e6-8289-b1c82d617a9c.png)
82
-
83
-Let's look again at the status. It's identical, just that the star is next to the newer image, to show it's the current image it has booted from.
84
-```
85
-root@photon-host [ ~ ]# rpm-ostree status
86
-  TIMESTAMP (UTC)        VERSION          ID            OSNAME    REFSPEC                              
87
-* 2016-06-13 22:23:25    1.0_minimal.1    184d9bbcec    photon    photon:photon/1.0/x86_64/minimal     
88
-  2016-06-07 14:06:17    1.0_minimal      56ef687f13    photon    photon:photon/1.0/x86_64/minimal         
89
-```
90
-
91
-Also, the current deployment directory is based on the new 82bca commit:
92
-```
93
-root@photon-host-def [ ~ ]# ostree admin config-diff --print-current-dir
94
-/ostree/deploy/photon/deploy/82bca728eadb7292d568404484ad6889c3f6303600ca8c743a4336e0a10b3817.0
95
-```
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
-
98
-### 5.3 Listing file differences   
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
-```
101
-root@photon-host-def [ ~ ]# ostree diff 2940 82bc
102
-M    /usr/etc/group-
103
-M    /usr/etc/gshadow
104
-M    /usr/etc/passwd-
105
-M    /usr/etc/shadow
106
-M    /usr/share/rpm/Basenames
107
-M    /usr/share/rpm/Conflictname
108
-M    /usr/share/rpm/Dirnames
109
-M    /usr/share/rpm/Group
110
-M    /usr/share/rpm/Installtid
111
-M    /usr/share/rpm/Name
112
-M    /usr/share/rpm/Obsoletename
113
-M    /usr/share/rpm/Packages
114
-M    /usr/share/rpm/Providename
115
-M    /usr/share/rpm/Requirename
116
-M    /usr/share/rpm/Sha1header
117
-M    /usr/share/rpm/Sigmd5
118
-M    /usr/share/rpm/Triggername
119
-M    /usr/share/rpm-ostree/treefile.json
120
-D    /boot/initramfs-4.0.9.img-49c11628bc4b702fcbf4a01abbb5249ddc845a81570a5616010f38b8967db197
121
-D    /boot/vmlinuz-4.0.9-49c11628bc4b702fcbf4a01abbb5249ddc845a81570a5616010f38b8967db197
122
-D    /usr/etc/gshadow-
123
-D    /usr/etc/shadow-
124
-D    /usr/lib/ostree-boot/initramfs-4.0.9.img-49c11628bc4b702fcbf4a01abbb5249ddc845a81570a5616010f38b8967db197
125
-D    /usr/lib/ostree-boot/vmlinuz-4.0.9-49c11628bc4b702fcbf4a01abbb5249ddc845a81570a5616010f38b8967db197
126
-A    /boot/initramfs-4.0.9.img-334842d15b642e70fac149bd5bbb7dd48965a3aca9da6a42d289a267a142f32f
127
-A    /boot/vmlinuz-4.0.9-334842d15b642e70fac149bd5bbb7dd48965a3aca9da6a42d289a267a142f32f
128
-A    /usr/bin/awk
129
-A    /usr/bin/gawk
130
-A    /usr/bin/gawk-4.1.0
131
-A    /usr/bin/igawk
132
-A    /usr/bin/sudo
133
-A    /usr/bin/sudoedit
134
-A    /usr/bin/sudoreplay
135
-A    /usr/bin/wget
136
-A    /usr/etc/pam.d/sudo
137
-A    /usr/etc/group.rpmnew
138
-A    /usr/etc/passwd.rpmnew
139
-A    /usr/etc/sudoers
140
-A    /usr/etc/wgetrc
141
-A    /usr/etc/sudoers.d
142
-A    /usr/include/gawkapi.h
143
-A    /usr/include/sudo_plugin.h
144
-A    /usr/lib/ostree-boot/initramfs-4.0.9.img-334842d15b642e70fac149bd5bbb7dd48965a3aca9da6a42d289a267a142f32f
145
-A    /usr/lib/ostree-boot/vmlinuz-4.0.9-334842d15b642e70fac149bd5bbb7dd48965a3aca9da6a42d289a267a142f32f
146
-A    /usr/lib/gawk
147
-A    /usr/lib/gawk/filefuncs.so
148
-A    /usr/lib/gawk/fnmatch.so
149
-A    /usr/lib/gawk/fork.so
150
-A    /usr/lib/gawk/inplace.so
151
-A    /usr/lib/gawk/ordchr.so
152
-A    /usr/lib/gawk/readdir.so
153
-A    /usr/lib/gawk/readfile.so
154
-A    /usr/lib/gawk/revoutput.so
155
-A    /usr/lib/gawk/revtwoway.so
156
-A    /usr/lib/gawk/rwarray.so
157
-A    /usr/lib/gawk/testext.so
158
-A    /usr/lib/gawk/time.so
159
-A    /usr/lib/sudo
160
-A    /usr/lib/sudo/group_file.so
161
-A    /usr/lib/sudo/libsudo_util.so
162
-A    /usr/lib/sudo/libsudo_util.so.0
163
-A    /usr/lib/sudo/libsudo_util.so.0.0.0
164
-A    /usr/lib/sudo/sudo_noexec.so
165
-A    /usr/lib/sudo/sudoers.so
166
-A    /usr/lib/sudo/system_group.so
167
-A    /usr/libexec/awk
168
-A    /usr/libexec/awk/grcat
169
-A    /usr/libexec/awk/pwcat
170
-A    /usr/sbin/visudo
171
-A    /usr/share/doc/gawk-4.1.0
172
-A    /usr/share/doc/gawk-4.1.0/api-figure1.eps
173
-A    /usr/share/doc/gawk-4.1.0/api-figure1.pdf
174
-A    /usr/share/doc/gawk-4.1.0/api-figure2.eps
175
-A    /usr/share/doc/gawk-4.1.0/api-figure2.pdf
176
-A    /usr/share/doc/gawk-4.1.0/api-figure3.eps
177
-A    /usr/share/doc/gawk-4.1.0/api-figure3.pdf
178
-A    /usr/share/doc/gawk-4.1.0/awkforai.txt
179
-A    /usr/share/doc/gawk-4.1.0/general-program.eps
180
-A    /usr/share/doc/gawk-4.1.0/general-program.pdf
181
-A    /usr/share/doc/gawk-4.1.0/lflashlight.eps
182
-A    /usr/share/doc/gawk-4.1.0/lflashlight.pdf
183
-A    /usr/share/doc/gawk-4.1.0/process-flow.eps
184
-A    /usr/share/doc/gawk-4.1.0/process-flow.pdf
185
-A    /usr/share/doc/gawk-4.1.0/rflashlight.eps
186
-A    /usr/share/doc/gawk-4.1.0/rflashlight.pdf
187
-A    /usr/share/doc/gawk-4.1.0/statist.eps
188
-A    /usr/share/doc/gawk-4.1.0/statist.jpg
189
-A    /usr/share/doc/gawk-4.1.0/statist.pdf
190
-A    /usr/share/doc/sudo-1.8.11p1
191
-A    /usr/share/doc/sudo-1.8.11p1/CONTRIBUTORS
192
-A    /usr/share/doc/sudo-1.8.11p1/ChangeLog
193
-A    /usr/share/doc/sudo-1.8.11p1/HISTORY
194
-A    /usr/share/doc/sudo-1.8.11p1/LICENSE
195
-A    /usr/share/doc/sudo-1.8.11p1/NEWS
196
-A    /usr/share/doc/sudo-1.8.11p1/README
197
-A    /usr/share/doc/sudo-1.8.11p1/TROUBLESHOOTING
198
-A    /usr/share/doc/sudo-1.8.11p1/UPGRADE
199
-A    /usr/share/doc/sudo-1.8.11p1/sample.pam
200
-A    /usr/share/doc/sudo-1.8.11p1/sample.sudo.conf
201
-A    /usr/share/doc/sudo-1.8.11p1/sample.sudoers
202
-A    /usr/share/doc/sudo-1.8.11p1/sample.syslog.conf
203
-A    /usr/share/locale/be/LC_MESSAGES/wget.mo
204
-A    /usr/share/locale/bg/LC_MESSAGES/wget.mo
205
-A    /usr/share/locale/ca/LC_MESSAGES/sudo.mo
206
-A    /usr/share/locale/ca/LC_MESSAGES/sudoers.mo
207
-A    /usr/share/locale/ca/LC_MESSAGES/wget.mo
208
-A    /usr/share/locale/cs/LC_MESSAGES/sudo.mo
209
-A    /usr/share/locale/cs/LC_MESSAGES/sudoers.mo
210
-A    /usr/share/locale/cs/LC_MESSAGES/wget.mo
211
-A    /usr/share/locale/da/LC_MESSAGES/gawk.mo
212
-A    /usr/share/locale/da/LC_MESSAGES/sudo.mo
213
-A    /usr/share/locale/da/LC_MESSAGES/sudoers.mo
214
-A    /usr/share/locale/da/LC_MESSAGES/wget.mo
215
-A    /usr/share/locale/de/LC_MESSAGES/gawk.mo
216
-A    /usr/share/locale/de/LC_MESSAGES/sudo.mo
217
-A    /usr/share/locale/de/LC_MESSAGES/sudoers.mo
218
-A    /usr/share/locale/de/LC_MESSAGES/wget.mo
219
-A    /usr/share/locale/el/LC_MESSAGES/sudoers.mo
220
-A    /usr/share/locale/el/LC_MESSAGES/wget.mo
221
-A    /usr/share/locale/en_GB/LC_MESSAGES/wget.mo
222
-A    /usr/share/locale/eo/LC_MESSAGES/sudo.mo
223
-A    /usr/share/locale/eo/LC_MESSAGES/sudoers.mo
224
-A    /usr/share/locale/eo/LC_MESSAGES/wget.mo
225
-A    /usr/share/locale/es/LC_MESSAGES/gawk.mo
226
-A    /usr/share/locale/es/LC_MESSAGES/sudo.mo
227
-A    /usr/share/locale/es/LC_MESSAGES/wget.mo
228
-A    /usr/share/locale/et/LC_MESSAGES/wget.mo
229
-A    /usr/share/locale/eu/LC_MESSAGES/sudo.mo
230
-A    /usr/share/locale/eu/LC_MESSAGES/sudoers.mo
231
-A    /usr/share/locale/eu/LC_MESSAGES/wget.mo
232
-A    /usr/share/locale/fi/LC_MESSAGES/gawk.mo
233
-A    /usr/share/locale/fi/LC_MESSAGES/sudo.mo
234
-A    /usr/share/locale/fi/LC_MESSAGES/sudoers.mo
235
-A    /usr/share/locale/fi/LC_MESSAGES/wget.mo
236
-A    /usr/share/locale/fr/LC_MESSAGES/gawk.mo
237
-A    /usr/share/locale/fr/LC_MESSAGES/sudo.mo
238
-A    /usr/share/locale/fr/LC_MESSAGES/wget.mo
239
-A    /usr/share/locale/ga/LC_MESSAGES/wget.mo
240
-A    /usr/share/locale/gl/LC_MESSAGES/sudo.mo
241
-A    /usr/share/locale/gl/LC_MESSAGES/wget.mo
242
-A    /usr/share/locale/he/LC_MESSAGES/wget.mo
243
-A    /usr/share/locale/hr/LC_MESSAGES/sudo.mo
244
-A    /usr/share/locale/hr/LC_MESSAGES/sudoers.mo
245
-A    /usr/share/locale/hr/LC_MESSAGES/wget.mo
246
-A    /usr/share/locale/hu/LC_MESSAGES/wget.mo
247
-A    /usr/share/locale/id/LC_MESSAGES/wget.mo
248
-A    /usr/share/locale/it/LC_MESSAGES/gawk.mo
249
-A    /usr/share/locale/it/LC_MESSAGES/sudo.mo
250
-A    /usr/share/locale/it/LC_MESSAGES/sudoers.mo
251
-A    /usr/share/locale/it/LC_MESSAGES/wget.mo
252
-A    /usr/share/locale/ja/LC_MESSAGES/gawk.mo
253
-A    /usr/share/locale/ja/LC_MESSAGES/sudo.mo
254
-A    /usr/share/locale/ja/LC_MESSAGES/sudoers.mo
255
-A    /usr/share/locale/ja/LC_MESSAGES/wget.mo
256
-A    /usr/share/locale/lt/LC_MESSAGES/sudoers.mo
257
-A    /usr/share/locale/lt/LC_MESSAGES/wget.mo
258
-A    /usr/share/locale/ms/LC_MESSAGES/gawk.mo
259
-A    /usr/share/locale/nb/LC_MESSAGES/sudo.mo
260
-A    /usr/share/locale/nb/LC_MESSAGES/sudoers.mo
261
-A    /usr/share/locale/nb/LC_MESSAGES/wget.mo
262
-A    /usr/share/locale/nl/LC_MESSAGES/gawk.mo
263
-A    /usr/share/locale/nl/LC_MESSAGES/sudo.mo
264
-A    /usr/share/locale/nl/LC_MESSAGES/sudoers.mo
265
-A    /usr/share/locale/nl/LC_MESSAGES/wget.mo
266
-A    /usr/share/locale/pl/LC_MESSAGES/gawk.mo
267
-A    /usr/share/locale/pl/LC_MESSAGES/sudo.mo
268
-A    /usr/share/locale/pl/LC_MESSAGES/sudoers.mo
269
-A    /usr/share/locale/pl/LC_MESSAGES/wget.mo
270
-A    /usr/share/locale/pt/LC_MESSAGES/wget.mo
271
-A    /usr/share/locale/pt_BR/LC_MESSAGES/sudo.mo
272
-A    /usr/share/locale/pt_BR/LC_MESSAGES/sudoers.mo
273
-A    /usr/share/locale/pt_BR/LC_MESSAGES/wget.mo
274
-A    /usr/share/locale/ro/LC_MESSAGES/wget.mo
275
-A    /usr/share/locale/ru/LC_MESSAGES/sudo.mo
276
-A    /usr/share/locale/ru/LC_MESSAGES/wget.mo
277
-A    /usr/share/locale/sk/LC_MESSAGES/wget.mo
278
-A    /usr/share/locale/sl/LC_MESSAGES/sudo.mo
279
-A    /usr/share/locale/sl/LC_MESSAGES/sudoers.mo
280
-A    /usr/share/locale/sl/LC_MESSAGES/wget.mo
281
-A    /usr/share/locale/sr/LC_MESSAGES/sudo.mo
282
-A    /usr/share/locale/sr/LC_MESSAGES/sudoers.mo
283
-A    /usr/share/locale/sr/LC_MESSAGES/wget.mo
284
-A    /usr/share/locale/sv/LC_MESSAGES/gawk.mo
285
-A    /usr/share/locale/sv/LC_MESSAGES/sudo.mo
286
-A    /usr/share/locale/sv/LC_MESSAGES/sudoers.mo
287
-A    /usr/share/locale/sv/LC_MESSAGES/wget.mo
288
-A    /usr/share/locale/tr/LC_MESSAGES/sudo.mo
289
-A    /usr/share/locale/tr/LC_MESSAGES/sudoers.mo
290
-A    /usr/share/locale/tr/LC_MESSAGES/wget.mo
291
-A    /usr/share/locale/uk/LC_MESSAGES/sudo.mo
292
-A    /usr/share/locale/uk/LC_MESSAGES/sudoers.mo
293
-A    /usr/share/locale/uk/LC_MESSAGES/wget.mo
294
-A    /usr/share/locale/vi/LC_MESSAGES/gawk.mo
295
-A    /usr/share/locale/vi/LC_MESSAGES/sudo.mo
296
-A    /usr/share/locale/vi/LC_MESSAGES/sudoers.mo
297
-A    /usr/share/locale/vi/LC_MESSAGES/wget.mo
298
-A    /usr/share/locale/zh_CN/LC_MESSAGES/sudo.mo
299
-A    /usr/share/locale/zh_CN/LC_MESSAGES/sudoers.mo
300
-A    /usr/share/locale/zh_CN/LC_MESSAGES/wget.mo
301
-A    /usr/share/locale/zh_TW/LC_MESSAGES/wget.mo
302
-A    /usr/share/man/man1/gawk.1.gz
303
-A    /usr/share/man/man1/igawk.1.gz
304
-A    /usr/share/man/man1/wget.1.gz
305
-A    /usr/share/man/man3/filefuncs.3am.gz
306
-A    /usr/share/man/man3/fnmatch.3am.gz
307
-A    /usr/share/man/man3/fork.3am.gz
308
-A    /usr/share/man/man3/ordchr.3am.gz
309
-A    /usr/share/man/man3/readdir.3am.gz
310
-A    /usr/share/man/man3/readfile.3am.gz
311
-A    /usr/share/man/man3/revoutput.3am.gz
312
-A    /usr/share/man/man3/revtwoway.3am.gz
313
-A    /usr/share/man/man3/rwarray.3am.gz
314
-A    /usr/share/man/man3/time.3am.gz
315
-A    /usr/share/man/man5/sudo.conf.5.gz
316
-A    /usr/share/man/man5/sudoers.5.gz
317
-A    /usr/share/man/man8/sudo.8.gz
318
-A    /usr/share/man/man8/sudo_plugin.8.gz
319
-A    /usr/share/man/man8/sudoedit.8.gz
320
-A    /usr/share/man/man8/sudoreplay.8.gz
321
-A    /usr/share/man/man8/visudo.8.gz
322
-A    /usr/share/awk
323
-A    /usr/share/awk/assert.awk
324
-A    /usr/share/awk/bits2str.awk
325
-A    /usr/share/awk/cliff_rand.awk
326
-A    /usr/share/awk/ctime.awk
327
-A    /usr/share/awk/ftrans.awk
328
-A    /usr/share/awk/getopt.awk
329
-A    /usr/share/awk/gettime.awk
330
-A    /usr/share/awk/group.awk
331
-A    /usr/share/awk/inplace.awk
332
-A    /usr/share/awk/join.awk
333
-A    /usr/share/awk/libintl.awk
334
-A    /usr/share/awk/noassign.awk
335
-A    /usr/share/awk/ord.awk
336
-A    /usr/share/awk/passwd.awk
337
-A    /usr/share/awk/quicksort.awk
338
-A    /usr/share/awk/readable.awk
339
-A    /usr/share/awk/rewind.awk
340
-A    /usr/share/awk/round.awk
341
-A    /usr/share/awk/strtonum.awk
342
-A    /usr/share/awk/walkarray.awk
343
-A    /usr/share/awk/zerofile.awk
344
-```
345
- 
346
-### 5.4 Listing package differences
347
-We can also look at package differences, as you expect, using the right tool for the job.
348
-```
349
-root@photon-host-def [ ~ ]# rpm-ostree db diff 2940 82bc    
350
-ostree diff commit old: 2940 (2940e10c4d90ce6da572cbaeeff7b511cab4a64c280bd5969333dd2fca57cfa8)
351
-ostree diff commit new: 82bc (82bca728eadb7292d568404484ad6889c3f6303600ca8c743a4336e0a10b3817)
352
-Added:
353
- gawk-4.1.0-2.ph1.x86_64
354
- sudo-1.8.11p1-4.ph1.x86_64
355
- wget-1.15-1.ph1.x86_64
356
-```
357
-
358
-### 5.5 Rollback
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
-```
361
-root@photon-host-def [ ~ ]# rpm-ostree rollback
362
-Moving '2940e10c4d90ce6da572cbaeeff7b511cab4a64c280bd5969333dd2fca57cfa8.0' to be first deployment
363
-Transaction complete; bootconfig swap: yes deployment count change: 0
364
-Removed:
365
-  gawk-4.1.0-2.ph1.x86_64
366
-  sudo-1.8.11p1-4.ph1.x86_64
367
-  wget-1.15-1.ph1.x86_64
368
-Successfully reset deployment order; run "systemctl reboot" to start a reboot
369
-```
370
-In fact, we can repeat the rollback operation as many times as we want before reboot. On each execution, it's going to change the order. It will not delete any image.  
371
-However, an upgrade will keep the current default image and will eliminate the other image, whichever that is. So if Photon installation rolled back to an older build, an upgrade will keep that, eliminate the newer version and will replace it with an even newer version at the next upgrade.  
372
-
373
-![grub-boot-0-1](https://cloud.githubusercontent.com/assets/13158414/9673725/3d33162a-525c-11e5-8292-5b79c48e0c6b.png)  
374
-The boot order moved back to original:
375
-```
376
-root@photon-host-def [ ~ ]# rpm-ostree status
377
-  TIMESTAMP (UTC)       VERSION             ID           OSNAME   REFSPEC                              
378
-* 2015-08-20 22:27:43   1.0_minimal     2940e10c4d   photon   photon:photon/1.0/x86_64/minimal     
379
-  2015-09-03 00:34:41   1.0_minimal.1   82bca728ea   photon   photon:photon/1.0/x86_64/minimal   
380
-```
381
-The current bootable image path moved also back to the original value:
382
-```
383
-root@photon-host-def [ ~ ]# ostree admin config-diff --print-current-dir
384
-/ostree/deploy/photon/deploy/2940e10c4d90ce6da572cbaeeff7b511cab4a64c280bd5969333dd2fca57cfa8.0 
385
-```
386
-
387
-### 5.6 Deleting a deployed filetree
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
-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
-You cannot delete the default bootable filetree, so passing 0 will result in an error.  
391
-```
392
-root@photon-host-def [ ~ ]# ostree admin undeploy -v 1
393
-OT: Using bootloader: OstreeBootloaderGrub2
394
-Transaction complete; bootconfig swap: yes deployment count change: -1
395
-Deleted deployment 82bca728eadb7292d568404484ad6889c3f6303600ca8c743a4336e0a10b3817.0
396
-
397
-root@photon-host-cus1 [ ~ ]# ostree admin undeploy -v 0
398
-error: Cannot undeploy currently booted deployment 0
399
-```
400
-Now, we can see that the newer image is gone, the deployment directory for commit 82bc has been removed.  
401
-```
402
-root@photon-host-def [ ~ ]# rpm-ostree status
403
-  TIMESTAMP (UTC)        VERSION        ID            OSNAME    REFSPEC                              
404
-* 2015-08-20 22:27:43    1.0_minimal    2940e10c4d    photon    photon:photon/1.0/x86_64/minimal 
405
-root@photon-host-cus1 [ ~ ]# ls /ostree/deploy/photon/deploy/                                        
406
-2940e10c4d90ce6da572cbaeeff7b511cab4a64c280bd5969333dd2fca57cfa8.0
407
-2940e10c4d90ce6da572cbaeeff7b511cab4a64c280bd5969333dd2fca57cfa8.0.origin   
408
-```
409
-However the commit is still there in the OSTree repo.
410
-```
411
-root@photon-host-def [ ~ ]# ostree log 82bc                 
412
-commit 82bca728eadb7292d568404484ad6889c3f6303600ca8c743a4336e0a10b3817
413
-Date:  2015-09-03 00:34:41 +0000
414
-Version: 1.0_minimal.1
415
-
416
-
417
-commit 2940e10c4d90ce6da572cbaeeff7b511cab4a64c280bd5969333dd2fca57cfa8
418
-Date:  2015-08-20 22:27:43 +0000
419
-Version: 1.0_minimal
420
-```
421
-But there is nothing to rollback to.
422
-```
423
-root@photon-host-def [ ~ ]# rpm-ostree rollback
424
-error: Found 1 deployments, at least 2 required for rollback
425
-```
426
-If we were to upgrade again, it would bring these packages back, but let's just check the differeneces.
427
-```
428
-root@photon-host-def [ ~ ]# rpm-ostree upgrade --check-diff
429
-Updating from: photon:photon/1.0/x86_64/minimal
430
-
431
-
432
-+gawk-4.1.0-2.ph1.x86_64
433
-+sudo-1.8.11p1-4.ph1.x86_64
434
-+wget-1.15-1.ph1.x86_64
435
-```
436
-
437
-### 5.7 Version skipping upgrade
438
-
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
-```
441
-root@photon-host-def [ ~ ]# rpm-ostree upgrade --check-diff
442
-Updating from: photon:photon/1.0/x86_64/minimal
443
-
444
-7 metadata, 13 content objects fetched; 1287 KiB transferred in 0 seconds
445
-+bison-3.0.2-2.ph1.x86_64
446
-+gawk-4.1.0-2.ph1.x86_64
447
-+tar-1.27.1-1.ph1.x86_64
448
-+wget-1.15-1.ph1.x86_64
449
-
450
-root@photon-host-def [ ~ ]# rpm-ostree upgrade -r          
451
-Updating from: photon:photon/1.0/x86_64/minimal
452
-
453
-107 metadata, 512 content objects fetched; 13064 KiB transferred in 1 seconds
454
-Copying /etc changes: 5 modified, 0 removed, 16 added
455
-Transaction complete; bootconfig swap: yes deployment count change: 1
456
-Freed objects: 19.3 MB
457
-```
458
-After reboot, let's check the booting filetrees, the current dir for the current filetree and look at commit differences:
459
-```
460
-root@photon-host-def [ ~ ]# rpm-ostree status 
461
-  TIMESTAMP (UTC)        VERSION          ID            OSNAME    REFSPEC                              
462
-* 2015-09-04 00:36:37    1.0_minimal.2    092e21d292    photon    photon:photon/1.0/x86_64/minimal
463
-  2015-08-20 22:27:43    1.0_minimal      2940e10c4d    photon    photon:photon/1.0/x86_64/minimal
464
-
465
-root@photon-host-cus1 [ ~ ]# ostree admin config-diff --print-current-dir
466
-/ostree/deploy/photon/deploy/092e21d2928090d507ce711d482e4402e310b5a7f46532c5e24e0789590d0373.0
467
-
468
-root@photon-host-cus1 [ ~ ]# rpm-ostree db diff  2940 092e
469
-ostree diff commit old: 2940 (2940e10c4d90ce6da572cbaeeff7b511cab4a64c280bd5969333dd2fca57cfa8)
470
-ostree diff commit new: 092e (092e21d2928090d507ce711d482e4402e310b5a7f46532c5e24e0789590d0373)
471
-Added:
472
- bison-3.0.2-2.ph1.x86_64
473
- gawk-4.1.0-2.ph1.x86_64
474
- tar-1.27.1-1.ph1.x86_64
475
- wget-1.15-1.ph1.x86_64
476
-
477
-root@photon-host-cus1 [ ~ ]# rpm-ostree db diff  82bc 092e
478
-error: Refspec '82bc' not found
479
-```
480
-Interesting fact: The metadata for commit 82bc has been removed from the local repo!  
481
-
482
-### 5.8 Tracking parent commits
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
-```
485
-root@photon-host-def [ ~ ]# rpm-ostree db diff  092e^ 092e
486
-error: No such metadata object 82bca728eadb7292d568404484ad6889c3f6303600ca8c743a4336e0a10b3817.commit
487
-error: Refspec '82cb' not found
488
-root@photon-host-def [ ~ ]# rpm-ostree db diff  092e^^ 092e
489
-error: No such metadata object 82bca728eadb7292d568404484ad6889c3f6303600ca8c743a4336e0a10b3817.commit
490
-````
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
-
493
-### 5.9 Resetting a branch to a previous commit
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
-```
496
-root@photon-host-def [ ~ ]# ostree reset photon:photon/1.0/x86_64/minimal 2940
497
-```
498
-Now if wee look again at the branch commit history, the head is at version 0.  
499
-```
500
-root@photon-host-def [ ~ ]# ostree log photon/1.0/x86_64/minimal
501
-commit 2940e10c4d90ce6da572cbaeeff7b511cab4a64c280bd5969333dd2fca57cfa8
502
-Date:  2015-08-20 22:27:43 +0000
503
-Version: 1.0_minimal
504
-```
505
-
506
-[[Back to main page|Photon-RPM-OSTree:-a-simple-guide]] | [[Previous page|Photon-RPM-OSTree:-4-Querying-for-commit,-file-and-package-metadata]] | [[ Next page >|Photon-RPM-OSTree:-6-Installing-a-server]]
507 1
\ No newline at end of file
508 2
deleted file mode 100644
... ...
@@ -1,48 +0,0 @@
1
-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
-
3
-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]]  
7
-
8
-Installation steps are the same to all Photon OS versions, except that under the hood:
9
-* Photon 1.0 sets up a 'minimal' sample file tree, so it's ready to accept host pull/install requests right away.
10
-* 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
-
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
-
15
-![PhotonChooseServer](https://cloud.githubusercontent.com/assets/13158414/14802949/1c5f92b8-0b0a-11e6-8d69-96e62218dfcb.png)
16
-
17
-Continue with setting up a host name (like photon-srv) and a root password and that's all you need. Installation took about 40 seconds for Fusion running on my Mac with SSD, but it should take longer time for spin hard drives.  
18
-
19
-For Photon 1.0, once the server boots, the RPM-OSTree repository is ready to accept pull request from hosts, because setting up a 'minimal' tree is part of installation. This ostree 'minimal' configuration is almost identical, as far as packages list, to the 'Photon Minimal' installation profile from 'Select Installation' menu. 
20
-
21
-![PhotonServerLogin](https://cloud.githubusercontent.com/assets/13158414/14802957/2f5ed7e8-0b0a-11e6-960d-04c6202b0c4e.png)
22
-
23
-
24
-In order for hosts to access server's OSTree repo via http, an Apache web server is configured as part of installation. If you want to also serve https, you need to take additional steps - configure the web server, open port 443 via iptables and install certificates specific to your organization, that I won't cover here.  
25
-
26
-The server's IP address will be passed to the Photon RPM-OSTree hosts that want to connect to this server.  
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
-
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.
30
-
31
-### 6.2 Composing your first OSTree repo  
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
-```
34
-root [ ~ ]# cd /srv/rpm-ostree
35
-root [ /srv/rpm-ostree ]# ostree --repo=repo init --mode=archive-z2
36
-root [ /srv/rpm-ostree ]# rpm-ostree compose tree --repo=repo photon-base.json
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.   
39
-
40
-### 6.2 Automated install of a server via kickstart
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
-
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:  
44
-```
45
-"type": "ostree_server"
46
-```
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 1
\ No newline at end of file
50 2
deleted file mode 100644
... ...
@@ -1,39 +0,0 @@
1
-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
-
3
-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
-
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
-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
-
9
-![PhotonHostCustom](https://cloud.githubusercontent.com/assets/13158414/14804629/fe17c7d4-0b19-11e6-9cc6-7e79f768b7b1.png)
10
-
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]].  
12
-
13
-![PhotonHostCustomURL](https://cloud.githubusercontent.com/assets/13158414/14804647/185f1aa2-0b1a-11e6-9e44-e2f54592da35.png)
14
-
15
-You will then be asked to enter a Refspec. Leave the default 'photon/1.0/x86_64/minimal' value, unless you've created a new branch at the server (we will see later how to do that).  
16
-
17
-![PhotonHostCustomRefspec](https://cloud.githubusercontent.com/assets/13158414/14804653/1f0d31cc-0b1a-11e6-8f56-e8cac1f72852.png)
18
-
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.  
21
-
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
-
24
-### 7.2 Automated install of a custom host via kickstart
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
-
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: 
28
-```
29
-    ...
30
-    "type": "ostree_host",
31
-    "ostree_repo_url": "http://192.168.218.249",
32
-    "ostree_repo_ref": "photon/1.0/x86_64/minimal",
33
-    ...
34
-```
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
-
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 1
\ No newline at end of file
41 2
deleted file mode 100644
... ...
@@ -1,322 +0,0 @@
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.   
2
-The simplest way to explain is to take a look at the files installed by the Photon RPM-OSTree server during setup.  
3
-```  
4
-root [ ~ ]# cd /srv/rpm-ostree/
5
-root [ /srv/rpm-ostree ]# ls -l
6
-total 16
7
-lrwxrwxrwx 1 root root   31 Aug 28 19:06 lightwave-ostree.repo -> /etc/yum.repos.d/lightwave.repo
8
--rw-r--r-- 1 root root 7356 Aug 28 19:06 ostree-httpd.conf
9
--rw-r--r-- 1 root root 1085 Aug 28 19:06 photon-base.json
10
-lrwxrwxrwx 1 root root   35 Aug 28 19:06 photon-extras-ostree.repo -> /etc/yum.repos.d/photon-extras.repo
11
-lrwxrwxrwx 1 root root   32 Aug 28 19:06 photon-iso-ostree.repo -> /etc/yum.repos.d/photon-iso.repo
12
-lrwxrwxrwx 1 root root   28 Aug 28 19:06 photon-ostree.repo -> /etc/yum.repos.d/photon.repo
13
-lrwxrwxrwx 1 root root   36 Aug 28 19:06 photon-updates-ostree.repo -> /etc/yum.repos.d/photon-updates.repo
14
-drwxr-xr-x 7 root root 4096 Aug 20 22:27 repo
15
-```
16
-### 9.1 JSON configuration file
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
-```
19
-root [ /srv/rpm-ostree ]# cat photon-base.json 
20
-{
21
-    "comment": "Photon Minimal OSTree",
22
-
23
-    "osname": "photon",
24
-
25
-    "ref": "photon/1.0/x86_64/minimal",
26
-
27
-    "automatic_version_prefix": "1.0_minimal",
28
-
29
-    "repos": ["photon"],
30
-
31
-    "selinux": false,
32
-
33
-    "initramfs-args": ["--no-hostonly"],
34
-
35
-    "bootstrap_packages": ["filesystem"],
36
-
37
-    "packages": ["glibc", "zlib", "binutils", "gmp", "mpfr", "libgcc", "libstdc++","libgomp",
38
-                "pkg-config", "ncurses", "bash", "bzip2", "cracklib", "cracklib-dicts", "shadow",
39
-                "procps-ng", "iana-etc", "readline", "coreutils", "bc", "libtool", "inetutils",
40
-                "findutils", "xz", "grub2", "iproute2", "util-linux", "linux",
41
-                "attr", "libcap", "kmod", "expat", "dbus", "file",
42
-                "sed", "grep", "cpio", "gzip",
43
-                "openssl", "ca-certificates", "curl",
44
-                "systemd",
45
-                "openssh", "iptables",
46
-                "photon-release",
47
-                "vim", "tdnf",
48
-                "docker","bridge-utils",
49
-                "dracut", "dracut-tools", "rpm-ostree", "nss-altfiles", "which"]
50
-}
51
-``` 
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.
54
-
55
-### 9.2 Package addition, removal, upgrade 
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
-Let's add to the list three new packages: gawk, sudo and wget using `vim photon-base.json`
58
-
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
-
61
-### 9.3 RPMS repository
62
-But where are these packages located? RPM-OStree uses the same standard RPMS repositories, that yum installs from.
63
-``` 
64
-root [ /srv/rpm-ostree ]# ls /etc/yum.repos.d/
65
-lightwave.repo  photon-iso.repo  photon-updates.repo  photon.repo
66
-```
67
-Going back to our JSON file, **repos** is a multi-value setting that tells RPM-OSTree in what RPMS repositories to look for packages. In this case, it looks in the current directory for a "photon" repo configuration file, that is a .repo file starting with a [photon] section. There is such a file: **photon-ostree.repo**, that is in fact a link to **photon.repo** in /etc/yum.repos.d directory.
68
-``` 
69
-root [ /srv/rpm-ostree ]# cat /etc/yum.repos.d/photon.repo 
70
-[photon]
71
-name=VMware Photon Linux 1.0(x86_64)
72
-baseurl=https://dl.bintray.com/vmware/photon_release_1.0_x86_64
73
-gpgkey=file:///etc/pki/rpm-gpg/VMWARE-RPM-GPG-KEY
74
-gpgcheck=1
75
-enabled=1
76
-skip_if_unavailable=True
77
-```
78
-In this case, `rpm-ostree` is instructed to download its packages in RPM format from the bintray URL, that is the location of an online RPMS repo maintained by the WMware Photon OS team. To make sure those packages are genuine, signed by VMware, the signature is checked against the official VMware public key.
79
-
80
-So what's in an RPMS repository? If we point the browser to https://dl.bintray.com/vmware/photon_release_1.0_x86_64, we can see there are three top directories:
81
-* noarch - where all packages that don't depend on the architecture reside. Those may contain scripts, platform neutral source files, configuration.
82
-* x86_64 - platform dependent packages for Intel 32 and 64 bits CPUs.
83
-* repodata - internal repo management data, like a catalog of all packages, and for every package its name, id, version, architecture and full path file/directory list. There is also a compressed XML file containing the history of changelogs extracted from github, as packages in RPM format were built by Photon OS team members from sources.
84
-
85
-Fortunately, in order to compose a tree, you don't need to download the packages from the online repository (which is time consuming - in the order of minutes), unless there are some new ones or updated versions of them, added by the Photon team after shipping 1.0 version or the 1.0 Refresh. A copy of the starter RPMS repository (as of 1.0 shipping date) has been included on the CD-ROM and you can access it.
86
-```
87
-root [ /srv/rpm-ostree ]# mount /dev/cdrom
88
-root [ /srv/rpm-ostree ]# ls /mnt/cdrom/RPMS
89
-noarch  repodata  x86_64
90
-```
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
-
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.
94
-```
95
-root [ /srv/rpm-ostree ]# cat /etc/yum.repos.d/photon-iso.repo 
96
-[photon-iso]
97
-name=VMWare Photon Linux 1.0(x86_64)
98
-baseurl=file:///mnt/cdrom/RPMS
99
-gpgkey=file:///etc/pki/rpm-gpg/VMWARE-RPM-GPG-KEY
100
-gpgcheck=1
101
-enabled=0
102
-skip_if_unavailable=True
103
-```
104
-
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
-
107
-
108
-### 9.4 Composing a tree
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
-```
111
-root [ /srv/rpm-ostree ]# rpm-ostree compose tree --repo=repo photon-base.json
112
-Previous commit: 2940e10c4d90ce6da572cbaeeff7b511cab4a64c280bd5969333dd2fca57cfa8
113
-
114
-Downloading metadata [=========================================================================] 100%
115
-
116
-Transaction: 117 packages
117
-  Linux-PAM-1.1.8-2.ph1.x86_64
118
-  attr-2.4.47-1.ph1.x86_64
119
-  ...
120
-  gawk-4.1.0-2.ph1.x86_64
121
-  ...
122
-  sudo-1.8.11p1-4.ph1.x86_64
123
-  ...
124
-  wget-1.15-1.ph1.x86_64
125
-  which-2.20-1.ph1.x86_64
126
-  xz-5.0.5-2.ph1.x86_64
127
-  zlib-1.2.8-2.ph1.x86_64
128
-Installing packages [==========================================================================] 100%
129
-Writing '/var/tmp/rpm-ostree.TVO089/rootfs.tmp/usr/share/rpm-ostree/treefile.json'
130
-Preparing kernel
131
-Creating empty machine-id
132
-Executing: /usr/bin/dracut -v --tmpdir=/tmp -f /var/tmp/initramfs.img 4.0.9 --no-hostonly
133
-...
134
-*** Including module: bash ***
135
-*** Including module: kernel-modules ***
136
-*** Including module: resume ***
137
-*** Including module: rootfs-block ***
138
-*** Including module: terminfo ***
139
-*** Including module: udev-rules ***
140
-Skipping udev rule: 91-permissions.rules
141
-Skipping udev rule: 80-drivers-modprobe.rules
142
-*** Including module: ostree ***
143
-*** Including module: systemd ***
144
-*** Including module: usrmount ***
145
-*** Including module: base ***
146
-/etc/os-release: line 1: Photon: command not found
147
-*** Including module: fs-lib ***
148
-*** Including module: shutdown ***
149
-*** Including modules done ***
150
-*** Installing kernel module dependencies and firmware ***
151
-*** Installing kernel module dependencies and firmware done ***
152
-*** Resolving executable dependencies ***
153
-*** Resolving executable dependencies done***
154
-*** Stripping files ***
155
-*** Stripping files done ***
156
-*** Store current command line parameters ***
157
-*** Creating image file ***
158
-*** Creating image file done ***
159
-Image: /var/tmp/initramfs.img: 11M
160
-========================================================================
161
-Version: dracut-041-1.ph1
162
-
163
-Arguments: -v --tmpdir '/tmp' -f --no-hostonly
164
-
165
-dracut modules:
166
-bash
167
-kernel-modules
168
-resume
169
-rootfs-block
170
-terminfo
171
-udev-rules
172
-ostree
173
-systemd
174
-usrmount
175
-base
176
-fs-lib
177
-shutdown
178
-========================================================================
179
-drwxr-xr-x  12 root     root            0 Sep  1 00:52 .
180
-crw-r--r--   1 root     root       5,   1 Sep  1 00:52 dev/console
181
-crw-r--r--   1 root     root       1,  11 Sep  1 00:52 dev/kmsg
182
-...   (long list of files removed)
183
-========================================================================
184
-Initializing rootfs
185
-Migrating /etc/passwd to /usr/lib/
186
-Migrating /etc/group to /usr/lib/
187
-Moving /usr to target
188
-Linking /usr/local -> ../var/usrlocal
189
-Moving /etc to /usr/etc
190
-Placing RPM db in /usr/share/rpm
191
-Ignoring non-directory/non-symlink '/var/tmp/rpm-ostree.TVO089/rootfs.tmp/var/lib/nss_db/Makefile'
192
-Ignoring non-directory/non-symlink '/var/tmp/rpm-ostree.TVO089/rootfs.tmp/var/cache/ldconfig/aux-cache'
193
-Ignoring non-directory/non-symlink '/var/tmp/rpm-ostree.TVO089/rootfs.tmp/var/log/btmp'
194
-Ignoring non-directory/non-symlink '/var/tmp/rpm-ostree.TVO089/rootfs.tmp/var/log/lastlog'
195
-Ignoring non-directory/non-symlink '/var/tmp/rpm-ostree.TVO089/rootfs.tmp/var/log/wtmp'
196
-Moving /boot
197
-Using boot location: both
198
-Copying toplevel compat symlinks
199
-Adding tmpfiles-ostree-integration.conf
200
-Committing '/var/tmp/rpm-ostree.TVO089/rootfs.tmp' ...
201
-photon/1.0/x86_64/minimal => c505f4bddb4381e8b5213682465f1e5bb150a18228aa207d763cea45c6a81bbe
202
-```
203
-I've cut a big part of logging, but as you can see, the new filetree adds to the top of the previous (initial) commit 2940e10c4d and produces a new commit c505f4bddb. Our packages gawk-4.1.0-2.ph1.x86_64, sudo-1.8.11p1-4.ph1.x86_64 and wget-1.15-1.ph1.x86_64 have been added.  
204
-
205
-During compose, `rpm-ostree` checks out the file tree into its uncompressed form, applies the package changes, places the updated RPM repo into /usr/share/rpm  and calls `ostree` to commit its changes back into the OSTree repo. If we were to look at the temp directory during this time:
206
-```
207
-root [ /srv/rpm-ostree ]# ls /var/tmp/rpm-ostree.TVO089/rootfs.tmp
208
-bin   dev   lib    media  opt     proc  run   srv  sysroot  usr
209
-boot  home  lib64  mnt    ostree  root  sbin  sys  tmp      var
210
-```
211
-If we repeat the command, and there is no change in the JSON file settings and no change in metadata, rpm-ostree will figure out that nothing has changed and stop. You can force however to redo the whole composition.
212
-```
213
-root [ /srv/rpm-ostree ]# rpm-ostree compose tree --repo=repo photon-base.json
214
-Previous commit: c505f4bddb4381e8b5213682465f1e5bb150a18228aa207d763cea45c6a81bbe
215
-
216
-Downloading metadata [=========================================================================] 100%
217
-
218
-
219
-No apparent changes since previous commit; use --force-nocache to override
220
-```
221
-
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
-
224
-
225
-### 9.5 Automatic version prefix
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
-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
-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
-
230
-
231
-### 9.6 Installing package updates
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
-```
234
-"repos": ["photon", "photon-updates"],
235
-```
236
-
237
-Even though you may have not modified the "packages" section in the json file, the newer versions of existing packages will be included in the new image and then downloaded by the host the usual way. Note that upgrading a package shows differently than adding (+) or removing (-). You may still see packages added (or removed) though because they are new dependencies (or no longer dependencies) for the newer versions of other packages, as libssh2 in the example below.
238
-```
239
-root [ ~ ]# rpm-ostree upgrade --check-diff
240
-Updating from: photon:photon/1.0/x86_64/minimal
241
-
242
-8 metadata, 13 content objects fetched; 1002 KiB transferred in 0 seconds
243
-!bridge-utils-1.5-2.ph1.x86_64
244
-=bridge-utils-1.5-3.ph1.x86_64
245
-!bzip2-1.0.6-5.ph1.x86_64
246
-=bzip2-1.0.6-6.ph1.x86_64
247
-!curl-7.47.1-2.ph1.x86_64
248
-=curl-7.51.0-2.ph1.x86_64
249
-!docker-1.11.0-5.ph1.x86_64
250
-=docker-1.12.1-1.ph1.x86_64
251
-...
252
-+libssh2-1.8.0-1.ph1.x86_64
253
-...
254
-
255
-root [ ~ ]# rpm-ostree upgrade             
256
-Updating from: photon:photon/1.0/x86_64/minimal
257
-
258
-258 metadata, 1165 content objects fetched; 76893 KiB transferred in 8 seconds
259
-Copying /etc changes: 6 modified, 0 removed, 14 added
260
-Transaction complete; bootconfig swap: yes deployment count change: 1
261
-Changed:
262
-  bridge-utils 1.5-2.ph1 -> 1.5-3.ph1
263
-  bzip2 1.0.6-5.ph1 -> 1.0.6-6.ph1
264
-  curl 7.47.1-2.ph1 -> 7.51.0-2.ph1
265
-  docker 1.11.0-5.ph1 -> 1.12.1-1.ph1
266
-  ...
267
-Added:
268
-  libssh2-1.8.0-1.ph1.x86_64
269
-Upgrade prepared for next boot; run "systemctl reboot" to start a reboot
270
-```
271
-
272
-Now if we want to see what packages have been updated and what issues have been fixed, just run at the host the command that we learned about in chapter 5.4.
273
-
274
-```
275
-root [ ~ ]# rpm-ostree db diff 56ef 396e
276
-ostree diff commit old: 56e (56ef687f1319604b7900a232715718d26ca407de7e1dc89251b206f8e255dcb4)
277
-ostree diff commit new: 396 (396e1116ad94692b8c105edaee4fa12447ec3d8f73c7b3ade4e955163d517497)
278
-Upgraded:
279
- bridge-utils-1.5-3.ph1.x86_64
280
-* Mon Sep 12 2016 Alexey Makhalov <amakhalov@vmware.com> 1.5-3
281
--	Update patch to fix-2.
282
-
283
- bzip2-1.0.6-6.ph1.x86_64
284
-* Fri Oct 21 2016 Kumar Kaushik <kaushikk@vmware.com> 1.0.6-6
285
--       Fixing security bug CVE-2016-3189.
286
-
287
- curl-7.51.0-2.ph1.x86_64
288
-* Wed Nov 30 2016 Xiaolin Li <xiaolinl@vmware.com> 7.51.0-2
289
--   Enable sftp support.
290
-
291
-* Wed Nov 02 2016 Anish Swaminathan <anishs@vmware.com> 7.51.0-1
292
--   	Upgrade curl to 7.51.0
293
-
294
-* Thu Oct 27 2016 Anish Swaminathan <anishs@vmware.com> 7.47.1-4
295
--   	Patch for CVE-2016-5421
296
-
297
-* Mon Sep 19 2016 Xiaolin Li <xiaolinl@vmware.com> 7.47.1-3
298
--   	Applied CVE-2016-7167.patch.
299
-
300
- docker-1.12.1-1.ph1.x86_64
301
-* Wed Sep 21 2016 Xiaolin Li <xiaolinl@vmware.com> 1.12.1-1
302
--   Upgraded to version 1.12.1
303
-
304
-* Mon Aug 22 2016 Alexey Makhalov <amakhalov@vmware.com> 1.12.0-2
305
--   Added bash completion file
306
-
307
-* Tue Aug 09 2016 Anish Swaminathan <anishs@vmware.com> 1.12.0-1
308
--   Upgraded to version 1.12.0
309
-
310
-* Tue Jun 28 2016 Anish Swaminathan <anishs@vmware.com> 1.11.2-1
311
--   Upgraded to version 1.11.2
312
-...
313
-Added:
314
- libssh2-1.8.0-1.ph1.x86_64
315
-``` 
316
-
317
-### 9.7 Composing for a different branch
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 1
\ No newline at end of file
324 2
deleted file mode 100644
... ...
@@ -1,51 +0,0 @@
1
-### Photon 1.0 GA: systemd-networkd and systemd-resolved not starting in the updated image, on reboot
2
-This issue has been fixed in 1.0 Revision 2 and above.
3
-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
-At server:  
5
-  1. Execute **umask 022**.  
6
-  2. Execute **rpm-ostree compose tree --force-nocache ...** to create a new, good image.  
7
-  3. Execute **umask 027** to tighten back the server permissions as good security practice.  
8
-
9
-At every host that booted into the bad image, from console:  
10
-  1. Execute **rpm-ostree rollback**, then reboot into the older good image.  
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
-  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
- 
14
-### OSTree repo is no longer accessible via http after RPM-OSTree server has updated httpd package
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
-
17
-* Replace the content of /usr/lib/systemd/system/httpd.service with:
18
-```
19
-[Unit]
20
-Description=The Apache HTTP Server
21
-After=network.target remote-fs.target nss-lookup.target
22
-
23
-[Service]
24
-Type=forking
25
-ExecStart=/usr/sbin/httpd -f /srv/rpm-ostree/ostree-httpd.conf -DFORGROUND
26
-ExecReload=/usr/sbin/httpd -f /srv/rpm-ostree/ostree-httpd.conf -k graceful
27
-KillSignal=SIGWINCH
28
-KillMode=mixed
29
-Restart=always
30
-
31
-[Install]
32
-WantedBy=multi-user.target
33
-```
34
-* systemctl daemon-reload
35
-* systemctl restart httpd
36
-
37
-### Error composing when photon-iso repo is selected
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
-  
40
-### Package differences between RPM-OSTree "minimal" and minimal installation profile
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
-
43
-That's easy to overcome - just add the wanted package names in the photon-base.json and re-compose the tree.
44
-
45
-
46
-
47
-### Manual pages not included for installed packages
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
-
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]]
52 1
deleted file mode 100644
... ...
@@ -1,192 +0,0 @@
1
-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
-
3
-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
-
5
-### 12.1 Installing an RPM-OSTree server
6
-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]].
8
-```
9
-root [ /srv/rpm-ostree ]# ostree --repo=repo init --mode=archive-z2
10
-root [ /srv/rpm-ostree ]# rpm-ostree compose tree --repo=repo photon-base.json
11
-```
12
-Now if you point a browser to http://<server_IP_address>, you should see the familiar directory structure of an OSTree repo.
13
-
14
-### 12.2 Installing an RPM-OSTree host
15
-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]].  
17
-
18
-### 12.3 Rebasing a host from Photon 1.0 to 2.0
19
-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
-
21
-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
-The OS name is the same (Photon), so the content in /var and /etc will be transferred over.  
23
-
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
-ostree should confirm that is the updated server IP for the "photon" remote.
27
-```
28
-root@ostree-host [ ~ ]# ostree remote show-url photon
29
-http://10.118.101.180
30
-```
31
-3. Rebase your host to the new 2.0 server and Refspec.
32
-```
33
-root@ostree-host [ ~ ]# rpm-ostree rebase photon/2.0/x86_64/minimal
34
-
35
-549 metadata, 2654 content objects fetched; 119853 KiB transferred in 17 seconds
36
-Copying /etc changes: 6 modified, 0 removed, 14 added
37
-Transaction complete; bootconfig swap: yes deployment count change: 1
38
-Deleting ref 'photon:photon/1.0/x86_64/minimal'
39
-Changed:
40
-  Linux-PAM 1.2.1-3.ph1 -> 1.3.0-1.ph2
41
-  attr 2.4.47-3.ph1 -> 2.4.47-4.ph2
42
-  autogen-libopts 5.18.7-2.ph1 -> 5.18.12-2.ph2
43
-  bash 4.3.30-4.ph1 -> 4.4-5.ph2
44
-  bc 1.06.95-3.ph1 -> 1.06.95-3.ph2
45
-  binutils 2.25.1-2.ph1 -> 2.29-3.ph2
46
-  bridge-utils 1.5-3.ph1 -> 1.6-1.ph2
47
-  bzip2 1.0.6-6.ph1 -> 1.0.6-8.ph2
48
-  ca-certificates 20160109-5.ph1 -> 20170406-3.ph2
49
-  coreutils 8.25-2.ph1 -> 8.27-2.ph2
50
-  cpio 2.12-2.ph1 -> 2.12-3.ph2
51
-  cracklib 2.9.6-2.ph1 -> 2.9.6-8.ph2
52
-  cracklib-dicts 2.9.6-2.ph1 -> 2.9.6-8.ph2
53
-  curl 7.51.0-2.ph1 -> 7.54.1-1.ph2
54
-  dbus 1.8.8-5.ph1 -> 1.11.12-1.ph2
55
-  device-mapper 2.02.141-5.ph1 -> 2.02.171-3.ph2
56
-  device-mapper-libs 2.02.141-5.ph1 -> 2.02.171-3.ph2
57
-  docker 1.12.1-1.ph1 -> 17.06.0-1.ph2
58
-  dracut 044-3.ph1 -> 045-4.ph2
59
-  dracut-tools 044-3.ph1 -> 045-4.ph2
60
-  elfutils-libelf 0.165-2.ph1 -> 0.169-1.ph2
61
-  expat 2.2.0-1.ph1 -> 2.2.0-2.ph2
62
-  file 5.24-2.ph1 -> 5.30-2.ph2
63
-  filesystem 1.0-8.ph1 -> 1.0-13.ph2
64
-  findutils 4.6.0-2.ph1 -> 4.6.0-3.ph2
65
-  flex 2.5.39-3.ph1 -> 2.6.4-2.ph2
66
-  glib 2.47.6-2.ph1 -> 2.52.1-2.ph2
67
-  glib-networking 2.46.1-2.ph1 -> 2.50.0-1.ph2
68
-  glibc 2.22-9.ph1 -> 2.26-1.ph2
69
-  gmp 6.0.0a-3.ph1 -> 6.1.2-2.ph2
70
-  gnutls 3.4.11-2.ph1 -> 3.5.10-1.ph2
71
-  gobject-introspection 1.46.0-2.ph1 -> 1.52.1-4.ph2
72
-  gpgme 1.6.0-2.ph1 -> 1.9.0-2.ph2
73
-  grep 2.21-2.ph1 -> 3.0-3.ph2
74
-  grub2 2.02-5.ph1 -> 2.02-9.ph2
75
-  gzip 1.6-2.ph1 -> 1.8-1.ph2
76
-  iana-etc 2.30-2.ph1 -> 2.30-2.ph2
77
-  iproute2 4.2.0-2.ph1 -> 4.10.0-3.ph2
78
-  iptables 1.6.0-5.ph1 -> 1.6.1-4.ph2
79
-  json-glib 1.0.4-2.ph1 -> 1.2.8-1.ph2
80
-  kmod 21-4.ph1 -> 24-3.ph2
81
-  krb5 1.14-4.ph1 -> 1.15.1-2.ph2
82
-  libarchive 3.1.2-7.ph1 -> 3.3.1-1.ph2
83
-  libassuan 2.4.2-2.ph1 -> 2.4.3-1.ph2
84
-  libcap 2.25-2.ph1 -> 2.25-7.ph2
85
-  libffi 3.2.1-2.ph1 -> 3.2.1-5.ph2
86
-  libgcc 5.3.0-3.ph1 -> 6.3.0-3.ph2
87
-  libgcrypt 1.6.5-2.ph1 -> 1.7.6-1.ph2
88
-  libgomp 5.3.0-3.ph1 -> 6.3.0-3.ph2
89
-  libgpg-error 1.21-2.ph1 -> 1.27-1.ph2
90
-  libgsystem 2015.1-2.ph1 -> 2015.2-1.ph2
91
-  librepo 1.7.17-2.ph1 -> 1.7.20-2.ph2
92
-  libselinux 2.5-2.ph1 -> 2.6-4.ph2
93
-  libsepol 2.5-2.ph1 -> 2.6-1.ph2
94
-  libsolv 0.6.19-2.ph1 -> 0.6.26-3.ph2
95
-  libsoup 2.53.90-2.ph1 -> 2.57.1-2.ph2
96
-  libssh2 1.8.0-1.ph1 -> 1.8.0-1.ph2
97
-  libstdc++ 5.3.0-3.ph1 -> 6.3.0-3.ph2
98
-  libtasn1 4.7-3.ph1 -> 4.10-1.ph2
99
-  libtool 2.4.6-2.ph1 -> 2.4.6-3.ph2
100
-  libxml2 2.9.4-3.ph1 -> 2.9.4-11.ph2
101
-  linux 4.4.41-1.ph1 -> 4.9.43-2.ph2
102
-  m4 1.4.17-2.ph1 -> 1.4.18-1.ph2
103
-  mkinitcpio 19-2.ph1 -> 23-3.ph2
104
-  mpfr 3.1.3-2.ph1 -> 3.1.5-1.ph2
105
-  ncurses 6.0-2.ph1 -> 6.0-10.ph2
106
-  net-tools 1.60-7.ph1 -> 1.60-10.ph2
107
-  nettle 3.2-2.ph1 -> 3.3-1.ph2
108
-  nspr 4.12-2.ph1 -> 4.15-1.ph2
109
-  nss-altfiles 2.19.1-2.ph1 -> 2.23.0-1.ph2
110
-  openssh 7.4p1-1.ph1 -> 7.5p1-4.ph2
111
-  openssl 1.0.2j-1.ph1 -> 1.0.2l-1.ph2
112
-  ostree 2015.7-5.ph1 -> 2017.5-1.ph2
113
-  pcre 8.39-1.ph1 -> 8.40-4.ph2
114
-  photon-release 1.0-6.ph1 -> 2.0-1.ph2
115
-  pkg-config 0.28-2.ph1 -> 0.29.2-1.ph2
116
-  popt 1.16-2.ph1 -> 1.16-4.ph2
117
-  procps-ng 3.3.11-3.ph1 -> 3.3.12-2.ph2
118
-  readline 6.3-4.ph1 -> 7.0-2.ph2
119
-  rpm-ostree 2015.7-2.ph1 -> 2017.5-1.ph2
120
-  sed 4.2.2-2.ph1 -> 4.4-2.ph2
121
-  shadow 4.2.1-8.ph1 -> 4.2.1-13.ph2
122
-  systemd 228-32.ph1 -> 233-7.ph2
123
-  util-linux 2.27.1-2.ph1 -> 2.29.2-3.ph2
124
-  vim 7.4-6.ph1 -> 8.0.0533-3.ph2
125
-  which 2.21-2.ph1 -> 2.21-3.ph2
126
-  xz 5.2.2-2.ph1 -> 5.2.3-2.ph2
127
-  zlib 1.2.8-3.ph1 -> 1.2.11-1.ph2
128
-Removed:
129
-  db-6.1.26-2.ph1.x86_64
130
-  e2fsprogs-1.42.13-2.ph1.x86_64
131
-  gdbm-1.11-2.ph1.x86_64
132
-  hawkey-2014.1-4.ph1.x86_64
133
-  iputils-20151218-3.ph1.x86_64
134
-  libhif-0.2.2-2.ph1.x86_64
135
-  lua-5.3.2-2.ph1.x86_64
136
-  nss-3.25-1.ph1.x86_64
137
-  python2-2.7.11-8.ph1.x86_64
138
-  python2-libs-2.7.11-8.ph1.x86_64
139
-  rpm-4.11.2-11.ph1.x86_64
140
-  sqlite-autoconf-3.11.0-2.ph1.x86_64
141
-  tcsh-6.19.00-4.ph1.x86_64
142
-Added:
143
-  bubblewrap-0.1.8-1.ph2.x86_64
144
-  bzip2-libs-1.0.6-8.ph2.x86_64
145
-  ca-certificates-pki-20170406-3.ph2.x86_64
146
-  curl-libs-7.54.1-1.ph2.x86_64
147
-  e2fsprogs-libs-1.43.4-2.ph2.x86_64
148
-  expat-libs-2.2.0-2.ph2.x86_64
149
-  fuse-2.9.7-2.ph2.x86_64
150
-  gnupg-2.1.20-2.ph2.x86_64
151
-  libdb-5.3.28-1.ph2.x86_64
152
-  libksba-1.3.5-1.ph2.x86_64
153
-  libltdl-2.4.6-3.ph2.x86_64
154
-  libseccomp-2.3.2-1.ph2.x86_64
155
-  ncurses-libs-6.0-10.ph2.x86_64
156
-  ncurses-terminfo-6.0-10.ph2.x86_64
157
-  npth-1.3-1.ph2.x86_64
158
-  nss-libs-3.31-2.ph2.x86_64
159
-  openssh-clients-7.5p1-4.ph2.x86_64
160
-  openssh-server-7.5p1-4.ph2.x86_64
161
-  pcre-libs-8.40-4.ph2.x86_64
162
-  pinentry-1.0.0-2.ph2.x86_64
163
-  rpm-libs-4.13.0.1-5.ph2.x86_64
164
-  sqlite-libs-3.19.3-1.ph2.x86_64
165
-  util-linux-libs-2.29.2-3.ph2.x86_64
166
-  xz-libs-5.2.3-2.ph2.x86_64
167
-
168
-root@ostree-host [ ~ ]# rpm-ostree status
169
-  TIMESTAMP (UTC)         VERSION           ID             OSNAME     REFSPEC                              
170
-  2017-08-31 18:19:36     2.0_minimal       f4497b1948     photon     photon:photon/2.0/x86_64/minimal
171
-* 2017-01-11 02:18:42     1.0_minimal.1     4a21972b29     photon     photon:photon/1.0/x86_64/minimal
172
-```
173
-That's it! You may now reboot to the new Photon OS 2.0 image. The updated ostree and rpm-ostree packages have a slightly changed output format:
174
-```
175
-root@ph2-ostree-host [ ~ ]# rpm-ostree status
176
-State: idle
177
-Deployments:
178
-* photon:photon/2.0/x86_64/minimal
179
-             Version: 2.0_minimal (2017-08-31 18:19:36)
180
-              Commit: f4497b194826adb0db6e17a6867df04edd1dc1ebe796a73db9f19b973b5658df
181
-
182
-  photon:photon/1.0/x86_64/minimal
183
-             Version: 1.0_minimal.1 (2017-01-11 02:18:42)
184
-              Commit: 4a21972b293978d39777017ccb33dde45713dd435b3cb77ee42161e7e849e5e4
185
-```
186
-
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
-
189
-### 12.4 Creating a host raw image
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
-
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 1
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
20 2
deleted file mode 100644
... ...
@@ -1,83 +0,0 @@
1
-Contents  
2
-***
3
-
4
-   [[Preface|Photon-RPM-OSTree:-Preface]]  
5
-
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]]    
75
-
76
-[[Appendix A: Known issues|Photon-RPM-OSTree:-Appendix-A:-Known-issues]]  
77
-
78
-***
79
-
80
-About the author  
81
-[Danut Moraru](mailto:dmoraru@vmware.com) is a Senior Software Design Engineer in the Photon OS Development team.  
82
-
83
-[[Next page >|Photon-RPM-OSTree:-Preface]]
84 1
\ No newline at end of file
85 2
deleted file mode 100644
... ...
@@ -1,116 +0,0 @@
1
-
2
-Now that we have a fresh installed host (either as [[default|Photon-RPM-OSTree:-2-Installing-a-host-against-default-server-repository]] or [[custom|Photon-RPM-OSTree:-7-Installing-a-host-against-a-custom-server-repository]]), I can explain better the OStree concepts and see them in action.  
3
-### 3.1 Querying the deployed filetrees
4
-The first thing to do is to run a command that tells us what is installed on the machine and when. Since it's a fresh install from the CD, there is only one bootable filetree image deployed.
5
-``` 
6
-root@photon-host [ ~ ]# rpm-ostree status
7
-  TIMESTAMP (UTC)       VERSION       ID           OSNAME  REFSPEC               
8
-* 2016-06-07 14:06:17   1.0_minimal   56ef687f13   photon  photon:photon/1.0/x86_64/minimal
9
-```  
10
-### 3.2 Bootable filetree version
11
-**1.0_minimal** is not the Linux Photon OS release version, nor daily build, but rather a human readable, self-incrementing version associated with every commit that brings file/package updates. Think of this as version 0. The following versions are going to be 1.0_minimal.1, 1.0_minimal.2, 1.0_minimal.3 and so on.
12
-
13
-### 3.3 Commit ID
14
-The ID listed is actually the first 5 bytes (10 hex digits) of the commit hash. If you want to see the entire 32 bytes hex number, just add the 'pretty' formatting option. The .0 at the end means that this is the default bootable deployment. This will change to 1 when another deployment will take its place as the default.
15
-```
16
-root@photon-host [ ~ ]# rpm-ostree status -p
17
-============================================================
18
-  * DEFAULT ON BOOT
19
-  version    1.0_minimal
20
-  timestamp  2016-06-07 14:06:17
21
-  id         56ef687f1319604b7900a232715718d26ca407de7e1dc89251b206f8e255dcb4.0
22
-  osname     photon     
23
-  refspec    photon:photon/1.0/x86_64/minimal
24
-============================================================
25
-```
26
-### 3.4 OSname
27
-The OS Name identifies the operating system installed. All bootable filetrees for the same OS will share the /var directory, in other words applications installed in one booted image into this directory will be available in all other images.  
28
-If a new set of images are created for a different OS, they will receive a fresh copy of /var that is not shared with the previous OS images for the initial OS. In other words, if a machine is dual boot for different operating systems, they will not share each other's /var content, however they will still merge 3-way /etc.
29
-
30
-### 3.5 Refspec
31
-The **Refspec** is a branch inside the repo, expressed in a hierarchical way. In this case, it's the default branch that will receive package updates for the Photon OS 1.0 Minimal installation profile on Intel platforms. There could be other branches in the future, for example photon/1.0/x86_64/full that will match the Full installation profile (full set of packages installed).  
32
-Think of Refspec as the head of the minimal branch (just like in git) at the origin repo. On the replicated, local repo at the host, **minimal** is a file that contains the latest commit ID known for that branch.  
33
-```
34
-root@photon-host [ ~ ]# cat /ostree/repo/refs/remotes/photon/photon/1.0/x86_64/minimal 
35
-56ef687f1319604b7900a232715718d26ca407de7e1dc89251b206f8e255dcb4
36
-```
37
-Why are there two 'photon' directory levels in the remotes path? The **photon:** prefix in the Refspec listed by `rpm-ostree status` corresponds to the first **photon** directory in the remotes path and is actually the name given to the remote that the host is connected to, which points to an http or https URL. We'll talk about remotes later, but for now think of it as a namespace qualifier.  The second **photon** is part of the Refspec path itself.
38
-
39
-### 3.6 Deployments
40
-We've used so far `rpm-ostree`. The same information can be obtained running an `ostree` command:
41
-```
42
-root@photon-host [ ~ ]# ostree admin status
43
-* photon 56ef687f1319604b7900a232715718d26ca407de7e1dc89251b206f8e255dcb4.0
44
-    Version: 1.0_minimal
45
-    origin refspec: photon:photon/1.0/x86_64/minimal
46
-```
47
-But where is this information stored? As you may have guessed, the local repo stores the heads of the deployed trees - the most recent commitment ID, just like Git does:  
48
-```
49
-root@photon-host [ ~ ]# cat /ostree/repo/refs/heads/ostree/0/1/0 
50
-56ef687f1319604b7900a232715718d26ca407de7e1dc89251b206f8e255dcb4
51
-```
52
-This also where this command that lists the references (local heads and remotes) takes its data from:
53
-```
54
-root@photon-host [ ~ ]# ostree refs
55
-photon:photon/1.0/x86_64/minimal
56
-ostree/0/1/0
57
-```
58
-Based on that, it could find the root of the deployment that it boots from. The actual filetree is deployed right here:
59
-```
60
-root@photon-host [ ~ ]# ls -l /ostree/deploy/photon/deploy/56ef687f1319604b7900a232715718d26ca407de7e1dc89251b206f8e255dcb4.0
61
-total 36
62
-lrwxrwxrwx  1 root root    7 Jun  9 18:26 bin -> usr/bin
63
-drwxr-xr-x  4 root root 4096 Jan  1  1970 boot
64
-drwxr-xr-x  2 root root 4096 Jan  1  1970 dev
65
-drwxr-xr-x 33 root root 4096 Jun 12 23:04 etc
66
-lrwxrwxrwx  1 root root    8 Jun  9 18:26 home -> var/home
67
-lrwxrwxrwx  1 root root    7 Jun  9 18:26 lib -> usr/lib
68
-lrwxrwxrwx  1 root root    7 Jun  9 18:26 lib64 -> usr/lib
69
-lrwxrwxrwx  1 root root    9 Jun  9 18:26 media -> run/media
70
-lrwxrwxrwx  1 root root    7 Jun  9 18:26 mnt -> var/mnt
71
-lrwxrwxrwx  1 root root    7 Jun  9 18:26 opt -> var/opt
72
-lrwxrwxrwx  1 root root   14 Jun  9 18:26 ostree -> sysroot/ostree
73
-drwxr-xr-x  2 root root 4096 Jan  1  1970 proc
74
-lrwxrwxrwx  1 root root   12 Jun  9 18:26 root -> var/roothome
75
-drwxr-xr-x  2 root root 4096 Jan  1  1970 run
76
-lrwxrwxrwx  1 root root    8 Jun  9 18:26 sbin -> usr/sbin
77
-lrwxrwxrwx  1 root root    7 Jun  9 18:26 srv -> var/srv
78
-drwxr-xr-x  2 root root 4096 Jan  1  1970 sys
79
-drwxr-xr-x  2 root root 4096 Jan  1  1970 sysroot
80
-lrwxrwxrwx  1 root root   11 Jun  9 18:26 tmp -> sysroot/tmp
81
-drwxr-xr-x 10 root root 4096 Jan  1  1970 usr
82
-drwxr-xr-x  7 root root 4096 Jun  9 18:26 var
83
-```  
84
-So how is a deployment linked to a specific branch, originating from a remote repo? Well, there is a file next to the deployed filetree root directory with the same name and **.origin** suffix, that contains exactly this info:
85
-```
86
-root@photon-host [ ~ ]# cat /ostree/deploy/photon/deploy/56ef687f1319604b7900a232715718d26ca407de7e1dc89251b206f8e255dcb4.0.origin 
87
-[origin]
88
-refspec=photon:photon/1.0/x86_64/minimal
89
-```  
90
-Fast forwarding a bit, if there is a new deployment due to an upgrade or rebase, a new filetree will be added at the same level, and a new .origin file will tie it to the remote branch it originated from.  
91
-
92
-The **photon** directory in the path is the actual OSname. Multiple deployments of same OS will share a writable /var folder.  
93
-```
94
-root@photon-host [ ~ ]# ls -l /ostree/deploy/photon/var/
95
-total 52
96
-drwxr-xr-x  4 root root 4096 Jun  9 18:26 cache
97
-drwxr-xr-x  2 root root 4096 Jun  9 18:26 home
98
-drwxr-xr-x 13 root root 4096 Jun  9 18:26 lib
99
-drwxr-xr-x  2 root root 4096 Jun  9 18:26 local
100
-lrwxrwxrwx  1 root root   11 Jun  9 18:26 lock -> ../run/lock
101
-drwxr-xr-x  3 root root 4096 Jun  9 18:26 log
102
-drwxr-xr-x  2 root root 4096 Jun  9 18:26 mail
103
-drwxr-xr-x  2 root root 4096 Jun  9 18:26 mnt
104
-drwxr-xr-x  2 root root 4096 Jun  9 18:26 opt
105
-drwx------  2 root root 4096 Jun 12 23:06 roothome
106
-lrwxrwxrwx  1 root root    6 Jun  9 18:26 run -> ../run
107
-drwxr-xr-x  2 root root 4096 Jun  9 18:26 spool
108
-drwxr-xr-x  2 root root 4096 Jun  9 18:26 srv
109
-drwxrwxrwt  4 root root 4096 Jun 12 23:04 tmp
110
-drwxr-xr-x 11 root root 4096 Jun  9 18:26 usrlocal
111
-```
112
-
113
-[[Back to main page|Photon-RPM-OSTree:-a-simple-guide]] | [[Previous page|Photon-RPM-OSTree:-2-Installing-a-host-against-default-server-repository]] | [[Next page >|Photon-RPM-OSTree:-4-Querying-for-commit,-file-and-package-metadata]] 
114
-
115
-
116 1
deleted file mode 100644
... ...
@@ -1,37 +0,0 @@
1
-In this chapter, we will checkout a filetree into a writable directory structure on disk, make several file changes and commit the changes back into the repository. Then we will download this commit and apply at the host. As you may have guessed, this chapter is mostly about OSTree - the base technology. I've not mentioned anything about packages, although it is quite possible to install packages (afler all, packages are made of files, right?) and commit without the help of rpm-ostree, but it's too much of a headache and not worth the effort, since rpm-ostree does it simpler and better.  
2
-
3
-When would you want to do that? When you want for all your hosts to get an application or configuration customization that is not encapsulated as part of a package upgrade.
4
-
5
-### 8.1 Starting a fresh OSTree repo  
6
-If you want to start fresh with your own branch and/or versioning scheme, you can delete the OSTree repo created during the Photon 1.0 RPM-OSTree server install and re-create it empty. For Photon OS 2.0 RPM-OSTree, this is a required step, as the installer will not create an OSTree repo for you, as you can see in 12.1.  
7
-```
8
-root [ /srv/rpm-ostree ]# rm -rf repo
9
-
10
-root [ /srv/rpm-ostree ]# ostree --repo=repo init --mode=archive-z2
11
-
12
-root [ /srv/rpm-ostree ]# ls repo                                  
13
-config  objects  refs  state  tmp  uncompressed-objects-cache
14
-
15
-root [ /srv/rpm-ostree ]# cat repo/config
16
-[core]
17
-repo_version=1
18
-mode=archive-z2
19
-```
20
-
21
-### 8.2 Checking out a filetree
22
-[content to be added]
23
-
24
-### 8.3 Committing changes to a filetree
25
-[content to be added]
26
-
27
-### 8.4 Downloading the changes at the host
28
-[content to be added]
29
-
30
-### 8.5 Creating summary metadata
31
-A newer ostree feature, available in Photon OS 2.0 and higher, allows the OSTree server admin to create server summary metadata, that includes among other things the list of available branches and the list of static deltas, so they could be discovered by hosts. To create a summary, run this command after you committed for your branches:
32
-```
33
-root [ /srv/rpm-ostree ]# ostree summary -u "This is BigData's OSTree server, it has three branches"
34
-```  
35
-We will find out later how the [[hosts query for branches list|Photon-RPM-OSTree:-10-Remotes#105-list-available-branches]]. 
36
-
37
-[[Back to main page|Photon-RPM-OSTree:-a-simple-guide]] | [[Previous page|Photon-RPM-OSTree:-7-Installing-a-host-against-a-custom-server-repository]] | [[Next page >|Photon-RPM-OSTree:-9-Package-oriented-server-operations]] 
38 1
\ No newline at end of file
39 2
deleted file mode 100644
... ...
@@ -1,49 +0,0 @@
1
-**Remotely Upgrade Multiple Photon OS Machines With Lightwave Client and Photon Management Daemon Installed**
2
-
3
-After you have a configured the Photon Management Daemon (PMD) on multiple machines, you can remotely upgrade any installed package on these machines.
4
-
5
-Upgrade process uses `copenapi_cli` that is supported from both Lightwave and Photon Management Daemon. You can initiate the upgrade process from any machine that has Photon Management Daemon installed.   
6
-
7
-**Prerequisites**
8
-
9
-- Have an installed Lightwave server with configured domain controller on it.
10
-- Have installed Lightwave clients that are joined to the domain.
11
-- Have installed Photon Management Daemon on the clients.
12
-
13
-**Procedure**
14
-
15
-1. To initiate remote upgrade, log in to a Photon OS machine over SSH to install the Photon Management Daemon CLI.
16
-
17
-	`# tdnf install pmd-cli` 
18
-2. Edit the `copenapi_cli` spec files so that you can specify the machines you want to upgrade and credentials to be used.
19
-	1. Edit the `.netrc` file to specify machines to be upgraded and credentials for the PMD service.
20
-
21
-		`# vi ~/.netrc`  
22
-	3. In the file, enter the IP addresses for the machines and administrative credentials, save and close the file.
23
-
24
-		`# machine <IP-address> login <pmd-administrative-user> password <pmd-administrative user-password>`
25
-
26
-	1. (Optional) Get the location of the `restapispec.json` file.
27
-
28
-		`# cat ~/.copenapi`
29
-
30
-		This command returns `apispec=/root/restapispec.json` as path for the spec file.
31
- 
32
-	3. Edit the `restapispec.json` file to enter the IP address of the machine to be upgraded.
33
-	
34
-		`# vi /root/restapispec.json`
35
-	4. Change the `host` value to the IP address or the hostname of the machine, leave the port number, and save and close the file.
36
-	
37
-		`"host":"<ip-address>:2081"` 
38
-	
39
-
40
-4. Initiate the upgrade, in this example of the `sed` package and wait for the command to complete.
41
-
42
-	Specify `-k` to force blind trust of certificates and `-n` to use the credentials from the `.netrc` file. 
43
-	`# copenapi_cli pkg update --packages sed -kn`
44
-
45
-5. (Optional) Verify that the package was upgraded successfully.
46
-	1. Log in to the machine that was upgraded over SSH.
47
-	2. List the installed version of the `sed` package.
48
-		
49
-		`# tdnf list installed sed`
50 1
\ No newline at end of file
51 2
deleted file mode 100644
... ...
@@ -1,35 +0,0 @@
1
-**Remotely Upgrade a Single Photon OS Machine With Lightwave Client and Photon Management Daemon Installed**
2
-
3
-After you have a configured the Photon Management Daemon on a machine, you can remotely upgrade any installed package on that machine. You can use the `root` user credentials.
4
-
5
-Upgrade process uses `pmd-cli` that is supported from both Lightwave and Photon Management Daemon. You can initiate the upgrade process from any machine that has Photon Management Daemon CLI installed.
6
-
7
-**Prerequisites**
8
-
9
-- Have an installed Lightwave server with configured domain controller on it.
10
-- Have an installed Lightwave client that is joined to the domain.
11
-- Have an installed Photon Management Daemon on the client.
12
-- Have in installed Photon Management Daemon CLI (pmd-cli) on a machine from which you perform the updates.
13
-
14
-**Procedure**
15
-
16
-1. To initiate remote upgrade, log in to a machine that has Photon Management Daemon CLI installed over SSH.
17
-2. Identify packages that can be upgraded on the client machine.
18
-	2. List the available updates for the machine.
19
-		
20
-		`# pmd-cli --server-name <machine-IP-address> --user root pkg list updates`
21
-	3. Verify the currently installed version of a package, for example `sed`.
22
-
23
-		`# `# pmd-cli --server-name <machine-IP-address> --user root pkg installed sed`
24
-		The installed version number shows as earlier than the one listed under the available updates.
25
-
26
-
27
-4. Initiate the upgrade, in this example of the `sed` package, enter password, and wait for the command to complete.
28
- 
29
-	`# pmd-cli --server-name <machine-IP-address> --user root pkg update sed`
30
-
31
-5. (Optional) Verify that the client machine package was upgraded successfully.
32
-	1. Log in to the machine that was upgraded over SSH.
33
-	2. List the installed version of the `sed` package.
34
-		
35
-		`# pmd-cli --server-name <machine-IP-address> --user root pkg installed sed`
36 1
\ No newline at end of file
37 2
deleted file mode 100644
... ...
@@ -1,46 +0,0 @@
1
-**Remotely Upgrade Multiple Photon OS Machines With Lightwave Client and Photon Management Daemon Installed**
2
-
3
-After you have a configured the Photon Management Daemon (PMD) on multiple machines, you can remotely upgrade any installed package on these machines.
4
-
5
-Upgrade process uses `copenapi_cli` that is supported from both Lightwave and Photon Management Daemon. You can initiate the upgrade process from any machine that has Photon Management Daemon installed.   
6
-
7
-**Prerequisites**
8
-
9
-- Have an installed Lightwave server with configured domain controller on it.
10
-- Have installed Lightwave clients that are joined to the domain.
11
-- Have installed Photon Management Daemon on the clients.
12
-
13
-**Procedure**
14
-
15
-1. To initiate remote upgrade, log in to a Photon OS machine over SSH to install the Photon Management Daemon CLI.
16
-
17
-	`# tdnf install pmd-cli` 
18
-2. Edit the `copenapi_cli` spec files so that you can specify the machines you want to upgrade and credentials to be used.
19
-	1. Edit the `.netrc` file to specify machines to be upgraded and credentials for the PMD service.
20
-
21
-		`# vi ~/.netrc`  
22
-	2. In the file, enter the IP addresses for the machines and administrative credentials, save and close the file.
23
-
24
-		`# machine <IP-address> login <pmd-administrative-user> password <pmd-administrative user-password>`
25
-
26
-	3. Go to [https://raw.githubusercontent.com/vmware/pmd/master/conf/restapispec.json](https://raw.githubusercontent.com/vmware/pmd/master/conf/restapispec.json "the following link") and save the `restapispec.json` file locally to the `root` folder.
27
-
28
- 
29
-	4. Edit the `restapispec.json` file to enter the IP address of the machine to be upgraded.
30
-	
31
-		`# vi /root/restapispec.json`
32
-	5. Change the `host` value to the IP address or the hostname of the machine, leave the port number, and save and close the file.
33
-	
34
-		`"host":"<ip-address>:2081"` 
35
-	
36
-
37
-4. Initiate the upgrade, in this example of the `sed` package and wait for the command to complete.
38
-
39
-	Specify `-k` to force blind trust of certificates and `-n` to use the credentials from the `.netrc` file. 
40
-	`# copenapi_cli pkg update  --packages sed -kn`
41
-
42
-5. (Optional) Verify that the client machine package was upgraded successfully.
43
-	1. Log in to the machine that was upgraded over SSH.
44
-	2. List the installed version of the `sed` package.
45
-		
46
-		`# tdnf list installed sed`
47 1
\ No newline at end of file
48 2
deleted file mode 100644
... ...
@@ -1,35 +0,0 @@
1
-**Remotely Upgrade a Single Photon OS Machine With Lightwave Client and Photon Management Daemon Installed**
2
-
3
-After you have a configured the Photon Management Daemon on a machine, you can remotely upgrade any installed package on that machine. You can use the `root` user credentials.
4
-
5
-Upgrade process uses `pmd-cli` that is supported from both Lightwave and Photon Management Daemon. You can initiate the upgrade process from any machine that has Photon Management Daemon CLI installed.
6
-
7
-**Prerequisites**
8
-
9
-- Have an installed Lightwave server with configured domain controller on it.
10
-- Have an installed Lightwave client that is joined to the domain.
11
-- Have an installed Photon Management Daemon on the client.
12
-- Have in installed Photon Management Daemon CLI (pmd-cli) on a machine from which you perform the updates.
13
-
14
-**Procedure**
15
-
16
-1. To initiate remote upgrade, log in to a machine that has Photon Management Daemon CLI installed over SSH.
17
-2. Identify packages that can be upgraded on the client machine.
18
-	2. List the available updates for the machine.
19
-		
20
-		`# pmd-cli --server-name <machine-IP-address> --user root pkg list updates`
21
-	3. Verify the currently installed version of a package, for example `sed`.
22
-
23
-		`# `# pmd-cli --server-name <machine-IP-address> --user root pkg installed sed`
24
-		The installed version number shows as earlier than the one listed under the available updates.
25
-
26
-
27
-4. Initiate the upgrade, in this example of the `sed` package, enter password, and wait for the command to complete.
28
- 
29
-	`# pmd-cli --server-name <machine-IP-address> --user root pkg update sed`
30
-
31
-5. (Optional) Verify that the client machine package was upgraded successfully.
32
-	1. Log in to the machine that was upgraded over SSH.
33
-	2. List the installed version of the `sed` package.
34
-		
35
-		`# pmd-cli --server-name <machine-IP-address> --user root pkg installed sed`
36 1
\ No newline at end of file
37 2
deleted file mode 100644
... ...
@@ -1,260 +0,0 @@
1
-This guide describes how to get Photon OS up and running on Amazon Web Services Elastic Cloud Compute (EC2), customize Photon with cloud-init, connect to it with SSH, and run a containerized application.
2
- 
3
-## About Photon OS?
4

                
5
-
6
-## Prerequisites
7
-
8
-Using Photon OS within AWS EC2 requires the following resources:
9
-
10
-- **AWS account**. Working with EC2 requires an Amazon account for AWS with valid payment information. Keep in mind that, if you try the examples in this document, you will be charged by Amazon. See [Setting Up with Amazon EC2](#http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/get-set-up-for-amazon-ec2.html).
11
-- **Amazon tools**. The following examples also assume that you have installed and configured the Amazon AWS CLI and the EC2 CLI and AMI tools, including ec2-ami-tools.
12
-
13
-See [Installing the AWS Command Line Interface](#http://docs.aws.amazon.com/cli/latest/userguide/installing.html), [Setting Up the Amazon EC2 Command Line Interface Tools on Linux](#http://docs.aws.amazon.com/AWSEC2/latest/CommandLineReference/set-up-ec2-cli-linux.html), and [Configuring AWS Command-Line Interface](#http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html). Also see [Setting Up the AMI Tools](#http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/set-up-ami-tools.html).
14
-This article uses an Ubuntu 14.04 workstation to generate the keys and certificates that AWS requires.
15
-
16
-## Downloading the Photon OS Image for Amazon
17
-
18
-VMware packages Photon OS as a cloud-ready Amazon machine image (AMI) that you can download for free from [Bintray](https://bintray.com/vmware/photon).
19
-
20
-Download the Photon OS AMI now and save it on your workstation. For instructions, see [Downloading Photon OS](#https://github.com/vmware/photon/wiki/Downloading-Photon-OS).
21
-
22
-**Note**: The AMI version of Photon is a virtual appliance with the information and packages that Amazon needs to launch an instance of Photon in the cloud. To build the AMI version, VMware starts with the minimal version of Photon OS and adds the sudo and tar packages to it. 
23
-
24
-## Getting Photon OS Up and Running on EC2
25
-
26
-To run Photon OS on EC2, you must use cloud-init with an EC2 data source. The cloud-init service configures the cloud instance of a Linux image. An _instance_ is a virtual server in the Amazon cloud. 
27
-
28
-The examples in this article show how to generate SSH and RSA keys for your Photon instance, upload the Photon OS `.ami` image to the Amazon cloud, and configure it with cloud-init. In many of the examples, you must replace information with your own paths, account details, or other information from Amazon. 
29
-
30
-### Step 1: Create a Key Pair
31
-
32
-The first step is to generate SSH keys on, for instance, an Ubuntu workstation: 
33
-
34
-	ssh-keygen -f ~/.ssh/mykeypair
35
-
36
-The command generates a public key in the file with a `.pub` extension and a private key in a file with no extension. Keep the private key file and remember the name of your key pair; the name is the file name of the two files without an extension. You'll need the name later to connect to the Photon instance.
37
-
38
-Change the mode bits of the public key pair file to protect its security. In the command, include the path to the file if you need to. 
39
-
40
-	chown 600 mykeypair.pub
41
-
42
-Change the mode bits on your private key pair file so that only you can view it:
43
-
44
-	chmod 400 mykeypair
45
-
46
-To import your public key pair file (but not your private key pair file), connect to the EC2 console at https://console.aws.amazon.com/ec2/ and select the region for the key pair. A key pair works in only one region, and the instance of Photon that will be uploaded later must be in the same region as the key pair. Select `key pairs` under `Network & Security`, and then import the public key pair file that you generated earlier. 
47
-
48
-For more information, see [Importing Your Own Key Pair to Amazon EC2](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html#how-to-generate-your-own-key-and-import-it-to-aws).
49
-
50
-### Step 2: Generate a Certificate
51
-
52
-When you bundle up an image for EC2, Amazon requires an RSA user signing certificate. You create the certificate by using openssl to first generate a private RSA key and then to generate the RSA certificate that references the private RSA key. Amazon uses the pairing of the private key and the user signing certificate for  handshake verification. 
53
-
54
-First, on Ubuntu 14.04 or another workstation that includes openssl, run the following command to generate a private key. If you change the name of the key, keep in mind that you will need to include the name of the key in the next command, which generates the certificate. 
55
-
56
-	openssl genrsa 2048 > myprivatersakey.pem
57
-
58
-Remember where you store your private key locally; you'll need it again later. 
59
-
60
-Second, run the following command to generate the certificate. The command prompts you to provide more information, but because you are generating a user signing certificate, not a server certificate, you can just type `Enter` for each prompt to leave all the fields blank. 
61
-
62
-	openssl req -new -x509 -nodes -sha256 -days 365 -key myprivatersakey.pem -outform PEM -out certificate.pem
63
-
64
-For more information, see the Create a Private Key and the Create the User Signing Certificate sections of [Setting Up the AMI Tools](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/set-up-ami-tools.html#ami-upload-bundle).
65
-
66
-Third, upload to AWS the certificate value from the `certificate.pem` file that you created in the previous command. Go to the Identity and Access Management console at https://console.aws.amazon.com/iam/, navigate to the name of your user, open the `Security Credentials` section, click `Manage Signing Certificates`, and then click `Upload Signing Certificate`. Open `certificate.pem` in a text editor, copy and paste the contents of the file into the `Certificate Body` field, and then click `Upload Signing Certificate`.
67
-
68
-For more information, see the Upload the User Signing Certificate section of [Setting Up the AMI Tools](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/set-up-ami-tools.html#ami-upload-bundle).
69
-
70
-### Step 3: Create a Security Group
71
-
72
-The next prerequisite is to create a security group and set it to allow SSH, HTTP, and HTTPS connections over ports 22, 80, and 443, respectively. Connect to the EC2 command-line interface and run the following commands: 
73
-
74
-	aws ec2 create-security-group --group-name photon-sg --description "My Photon security group"
75
-	{
76
-	    "GroupId": "sg-d027efb4"
77
-	}
78
-	aws ec2 authorize-security-group-ingress --group-name photon-sg --protocol tcp --port 22 --cidr 0.0.0.0/0
79
-
80
-The `GroupId` is returned by EC2. Write it down; you'll need it later.
81
-
82
-By using `0.0.0.0/0` for SSH ingress on Port 22, you are opening the port to all IP addresses--which is not a security best practice but a convenience for the examples in this article. For a production instance or other instances that are anything more than temporary machines, you should authorize only a specific IP address or range of addresses. See Amazon's document on [Authorizing Inbound Traffic for Linux Instances](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/authorizing-access-to-an-instance.html).
83
-
84
-Repeat the command to allow incoming traffic on Port 80 and on Port 443: 
85
-
86
-	aws ec2 authorize-security-group-ingress --group-name photon-sg --protocol tcp --port 80 --cidr 0.0.0.0/0
87
-
88
-	aws ec2 authorize-security-group-ingress --group-name photon-sg --protocol tcp --port 443 --cidr 0.0.0.0/0
89
-
90
-Check your work: 
91
-
92
-	aws ec2 describe-security-groups --group-names photon-sg
93
-
94
-### Step 4: Extract the Tarball 
95
-
96
-Next, make a directory to store the image, and then extract the Photon OS image from its archive by running the following `tar` command. (You might have to change the file name to match the version you have.)    
97
-
98
-	mkdir bundled
99
-	tar -zxvf ./photon-ami.tar.gz
100
-
101
-### Step 5: Bundle the Image
102
-
103
-The next step is to run the `ec2-bundle-image` command to create an instance store-backed Linux AMI from the Photon OS image that you extracted in the previous step. The result of the `ec2-bundle-image` command is a manifest that describes the machine in an XML file. 
104
-
105
-The command uses the certificate path to your PEM-encoded RSA public key certificate file; the path to your PEM-encoded RSA private key file; your EC2 user account ID; the correct architecture for Photon OS; the path to the Photon OS AMI image extracted from its tar file; and the `bundled` directory from the previous step. 
106
-
107
-You must replace the values of the certificate path, the private key, and the user account with your own values.
108
-
109
-	$ ec2-bundle-image --cert certificate.pem --privatekey myprivatersakey.pem --user <EC2 account id>  --arch x86_64 --image photon-ami.raw --destination ./bundled/
110
-
111
-### Step 6: Put the Bundle in a Bucket
112
-
113
-Next, make an S3 bucket, replacing `<bucket-name>` with the name that you want. The command creates the bucket in the region specified in your Amazon configuration file, which should be the same region in which you are using your key pair file: 
114
-
115
-	$ aws s3 mb s3://<bucket-name>
116
-
117
-Now upload the bundle to the Amazon S3 cloud. The following command includes the path to the XML file containing the manifest for the Photon OS machine created during the previous step, though you might have to change the file name to match the version you have. The manifest file is typically located in the same directory as the bundle. 
118
-
119
-The command also includes the name of the Amazon S3 bucket in which the bundle is to be stored; your AWS access key ID; and your AWS secret access key.
120
-
121
-	$ ec2-upload-bundle --manifest ./bundled/photon-ami.manifest.xml --bucket <bucket-name> --access-key <Account Access Key> --secret-key <Account Secret key>
122
-
123
-### Step 7: Register the Image
124
-
125
-The final step in creating an AMI before you can launch it is to register it. The following command includes a name for the AMI, its architecture, and its virtualization type. The virtualization type for Photon OS is `hvm`.
126
-
127
-	$ ec2-register <bucket-name>/photon-ami.manifest.xml --name photon-ami --architecture x86_64 --virtualization-type hvm
128
-
129
-Once registered, you can launch as many new instances as you want.
130
-
131
-### Step 8: Run an Instance of the Image with Cloud-Init
132
-
133
-Now things get a little tricky. In the following command, the `user-data-file` option instructs cloud-init to import the cloud-config data in `user-data.txt`.  
134
-
135
-The command also includes the ID of the AMI, which you can obtain by running `ec2-describe-images`; the instance type of `m3.medium`, which is a general purpose instance type; and the name of key pair, which should be replaced with your own--otherwise, you won't be able to connect to the instance. 
136
-
137
-Before you run the command, change directories to the directory containing the `mykeypair` file and add the path to the `user-data.txt`. 
138
-
139
-	$ ec2-run-instances <ami-ID> --instance-type m3.medium -g photon-sg --key mykeypair --user-data-file user-data.txt
140
-
141
-Here are the contents of the `user-data.txt` file that cloud-init applies to the machine the first time it boots up in the cloud.  
142
-
143
-	#cloud-config
144
-	hostname: photon-on-01
145
-	groups:
146
-	- cloud-admins
147
-	- cloud-users
148
-	users:
149
-	- default
150
-	- name: photonadmin
151
-	   gecos: photon test admin user
152
-	   primary-group: cloud-admins
153
-	   groups: cloud-users
154
-	   lock-passwd: false
155
-	   passwd: vmware
156
-	- name: photonuser
157
-	   gecos: photon test user
158
-	   primary-group: cloud-users
159
-	   groups: users
160
-	   passwd: vmware
161
-	packages:
162
-	- vim
163
-
164
-### Step 9: Get the IP Address of Your Image
165
-
166
-Now run the following command to check on the state of the instance that you launched: 
167
-
168
-	$ ec2-describe-instances
169
-
170
-Finally, you can obtain the external IP address of the instance by running the following query: 
171
-
172
-	$ aws ec2 describe-instances --instance-ids <instance-id> --query 'Reservations[*].Instances[*].PublicIpAddress' --output=text
173
-
174
-If need be, check the cloud-init output log file on EC2 at `/var/log/cloud-init-output.log` to see how EC2 handled the settings in the cloud-init data file. 
175
-
176
-For more information on using cloud-init user data on EC2, see [Running Commands on Your Linux Instance at Launch](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html).
177
-
178
-## Deploy a Containerized Application in Photon OS
179
-
180
-This section shows you how to connect to the Photon instance by using SSH and to launch a web server by running it in Docker.
181
-
182
-### Step 1: Connect with SSH
183
-
184
-Connect to the instance over SSH by specifying the private key (.pem) file and the user name for the Photon machine, which is `root`:
185
-
186
-	ssh -i ~/.ssh/mykeypair root@<public-ip-address-of-instance>
187
-
188
-For complete instructions, see [Connecting to Your Linux Instance Using SSH](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AccessingInstancesLinux.html). 
189
-
190
-### Step 2: Run Docker
191
-
192
-On the minimal version of Photon OS, the docker engine is enabled and running by default, which you can see by running the following command: 
193
-
194
-	systemctl status docker
195
-
196
-### Step 3: Start the Web Server
197
-
198
-**Note**: Please make sure that the proper security policies have been enabled on the Amazon AWS side to enable traffic to port 80 on the VM. 
199
-
200
-Since Docker is running, you can run an application in a container--for example, the Nginx Web Server. This example uses the popular open source web server Nginx. The Nginx application has a customized VMware package that the Docker engine can download directly from the Docker Hub.
201
-
202
-To pull Nginx from its Docker Hub and start it, run the following command: 
203
-
204
-	docker run -p 80:80 vmwarecna/nginx
205
-
206
-The Nginx web server should be bound to the public DNS value for  the instance of Photon OS--that is, the same address with which you connected over SSH. 
207
-
208
-### Step 4: Test the Web Server
209
-
210
-On your local workstation, open a web browser and go to the the public address of the Photon OS instance running Docker. The following screen should appear, showing that the web server is active:
211
-
212
-![Nginx](https://cloud.githubusercontent.com/assets/11306358/9568169/a6d4b140-4f07-11e5-934d-acda0bf505e8.jpg)
213
-
214
-When you're done, halt the Docker container by typing `Ctrl+c` in the SSH console where you are connected to EC2. 
215
-
216
-You can now run other containerized applications from the Docker Hub or your own containerized application on Photon OS in the Amazon cloud. 
217
-
218
-## Launching the Web Server with Cloud-Init
219
-
220
-To eliminate the manual effort of running Docker, you can add `docker run` and its arguments to the cloud-init user data file by using `runcmd`: 
221
-
222
-	#cloud-config
223
-	hostname: photon-on-01
224
-	groups:
225
-	- cloud-admins
226
-	- cloud-users
227
-	users:
228
-	- default
229
-	- name: photonadmin
230
-	   gecos: photon test admin user
231
-	   primary-group: cloud-admins
232
-	   groups: cloud-users
233
-	   lock-passwd: false
234
-	   passwd: vmware
235
-	- name: photonuser
236
-	   gecos: photon test user
237
-	   primary-group: cloud-users
238
-	   groups: users
239
-	   passwd: vmware
240
-	packages:
241
-	- vim
242
-	runcmd:
243
-	- docker run -p 80:80 vmwarecna/nginx
244
-
245
-To try this addition, you'll have to run another instance with this new cloud-init data source and then get the instance's public IP address to check that the Nginx web server is running. 
246
-
247
-## Terminating the AMI Instance
248
-
249
-Because Amazon charges you while the instance is running, make sure to shut it down when you're done.  
250
-
251
-First, get the ID of the AMI so you can terminate it: 
252
-
253
-	$ ec2-describe-instances
254
-
255
-Finally, terminate the Photon OS instance by running the following command, replacing the placeholder with the ID that the `ec2-describe-images` command returned. If you ran a second instance of Photon OS with the cloud-init file that runs docker, terminate that instance, too. 
256
-
257
-	$ ec2-terminate-instances <instance-id>
258
-
259
-
260
-
261 1
deleted file mode 100644
... ...
@@ -1,117 +0,0 @@
1
-
2
-This guide describes how to get started using Photon OS as a virtual machine on Google Compute Engine (GCE). Once Photon OS is installed as an image on GCE, this document shows how to deploy a containerized application in Docker with a single command.
3
-
4
-- [About Photon OS](#about-photon-os)
5
-- [Prerequisites for Photon OS on GCE](#prerequisites-for-photon-os-on-gce)
6
-- [Downloading Photon OS](#downloading-photon-os)
7
-- [Installing Photon OS on Google Compute Engine](#installing-photon-os-on-google-compute-engine)
8
-- [Deploying a Containerized Application in Photon OS](#deploying-a-containerized-application-in-photon-os)
9
-
10
-# About Photon OS
11
-
12
-Photon OS™ is an open source Linux container host optimized for cloud-native applications, cloud platforms, and VMware infrastructure. Photon OS provides a secure run-time environment for efficiently running containers. For an overview, see  [https://vmware.github.io/photon/](https://vmware.github.io/photon/).
13
-
14
-# Prerequisites for Photon OS on GCE
15
-
16
-Using Photon OS on Google Compute Engine requires the following resources:
17
-
18
-* An account on Google Compute Engine
19
-* The Google Cloud SDK
20
-* The Photon OS image for GCE
21
-
22
-Keep in mind that, if you try the examples in this document, Google will charge your account for the cloud services that you use. The GCE-ready version of Photon OS, however, comes for free.
23
-
24
-# Downloading Photon OS
25
-
26
-VMware recommends that administrators use the Photon OS image for Google Compute Engine (GCE) to create Photon OS instances on GCE. Although earlier releases of Photon OS required heavy modification of the Photon instance to make the image compatible with GCE, Photon OS 1.0 comes with pre-modified images for popular cloud providers, including GCE.
27
-
28
-You can download the Photon OS image for GCE from the following URL:
29
-
30
-[https://bintray.com/vmware/photon](https://bintray.com/vmware/photon)
31
-
32
-For instructions, see [Downloading Photon OS](https://github.com/vmware/photon/wiki/Downloading-Photon-OS).
33
-
34
-# Installing Photon OS on Google Compute Engine
35
-
36
-After you download the Photon OS image for GCE, log into GCE and complete the following steps.
37
-
38
-## Step 1: Create a New Bucket
39
-
40
-Create a new bucket to store your Photon OS image for GCE.
41
-
42
-![gce1](https://cloud.githubusercontent.com/assets/11306358/9568167/a6a8a91a-4f07-11e5-9a65-8d3867578a3b.jpg)
43
-
44
-## Step 2: Upload the Photon OS Image
45
-
46
-Once you’ve created the bucket, you’re ready to upload the Photon OS image. While viewing the bucket that you’ve created, click the `Upload files` button, navigate to your Photon OS image and click the `Choose` button. 
47
-
48
-As the image below shows, when the upload finishes, you should see your Photon OS compressed image in the file list for the bucket that you created.
49
-
50
-![gce2](https://cloud.githubusercontent.com/assets/11306358/9568168/a6c86732-4f07-11e5-8072-1c542d4f12e0.jpg)
51
-
52
-## Step 3: Create a New Image
53
-
54
-Next, you need to create a new image. Click on `Images` in the `Compute` category in the left panel; then, click on the `New Image` button. 
55
-
56
-Enter a name for the image in the `Name` field and change the `Source` to `Cloud Storage file` using the pull-down menu. Then, in the `Cloud Storage file` field, enter the bucket name and filename as the path to the Photon OS image for GCE. In this example, where the bucket was named `photon_storage,` the path is as follows:
57
- 
58
-	photon_storage/photon-gce-2.0-tar.gz
59
-
60
-*Note: The new image form will autopopulate the `gs://` file path prefix.*
61
-
62
-After you’re finished completing the name and Cloud Storage object path, click the `Create` button to create your image. You should be returned to your Images catalog and your Photon OS image should be at the top of the list. 
63
-
64
-## Step 4: Create a New Instance
65
-
66
-To create an instance, check the box next to the Photon OS image and click the `Create Instance` button. 
67
-
68
-On the `Create a new instance` form, provide a name for this instance, confirm the zone into which this instance is to be deployed and, before clicking `Create,` place a check in the boxes for `Allow HTTP traffic` and `Allow HTTPS traffic.` 
69
-
70
-Outside of this demo, your application may or may not require these firewall rules. Please choose accordingly outside of this demo. However, since we will demonstrate a running web server container, we want these ports to be open for our instance. 
71
-
72
-![gce4](https://cloud.githubusercontent.com/assets/11306358/9568170/a6f30492-4f07-11e5-99b5-a9c2fe72ec1d.jpg)
73
-
74
-When the instance is created you will be returned to your list of VM instances. If you click on the instance, the status page for the instance will allow you to SSH into your Photon OS environment using the SSH button at the top of the panel. 
75
-
76
-At this point, your instance is running and you are ready to start the Docker engine and run a container workload.
77
-
78
-# Deploying a Containerized Application in Photon OS
79
-
80
-Now that you have your container runtime environment up and running, you can easily deploy a containerized application. For this example, you will deploy the popular open source Web Server Nginx. The Nginx application has a customized VMware package that is published as a dockerfile and can be downloaded directly through the Docker module from the Docker Hub.
81
-
82
-## Step 1: Run Docker
83
-
84
-To run Docker from the command prompt, enter the command below to initialize the Docker engine:
85
-
86
-    systemctl start docker
87
-
88
-To ensure Docker daemon service runs on every subsequent VM reboot, enter:
89
- 
90
-    systemctl enable docker
91
-
92
-## Step 2: Run the Nginx Web Server
93
-
94
-Now that the Docker daemon service is running, it is a simple task to pull and then start the Nginx Web Server container from Docker Hub.  To do this, type the following command:
95
- 
96
-    docker run -d -p 80:80 vmwarecna/nginx
97
-
98
-This command pulls the Nginx Web Server files and the dependent containers to ensure this containerized application can run.  You will see a screenshot similar to the one below, as the container and dependencies are downloaded and the container is prepared to run:
99
-
100
-![gce5](https://cloud.githubusercontent.com/assets/11306358/9568172/a6fe2372-4f07-11e5-82dd-12d6ebd8a7c6.jpg)
101
-
102
-Once the `docker run` process is completed, you will be returned to the command prompt.  You now have a fully active website up and running through typing just a single command within Photon OS using containers.
103
-
104
-
105
-## Step 3: Test the Web Server
106
-
107
-**Note** : Please make sure that the proper security policies have been enabled on the Google GCE side to enable traffic to port 80 on the VM.
108
-
109
-To test that your web server is active, we need to get the IP address of the Photon OS virtual machine. To get the IP address, enter the following command:
110
-
111
-This command displays a list of network adapters connected to the virtual machine. Typically, the web server daemon will be bound to `eth0;` record the IP address associated with `eth0.` Alternatively, visit the status page of your Photon OS instance in GCE where the IP address is listed under `External IP.`
112
-
113
-Start a browser on your host machine and enter the IP address of your Photon OS virtual machine. The following screen should appear, showing that your web server is active:
114
-
115
-![gce6](https://cloud.githubusercontent.com/assets/11306358/9568169/a6d4b140-4f07-11e5-934d-acda0bf505e8.jpg)
116
-
117
-You can now run any other containerized application from Docker Hub or your own containerized application within Photon OS.
118 1
deleted file mode 100644
... ...
@@ -1,244 +0,0 @@
1
-# Running Photon OS on Microsoft Azure
2
-
3
-Photon OS can serve as a run-time environment for Linux containers on Microsoft Azure. This topic describes how to set up and run the cloud-ready version of Photon OS as an instance of a virtual machine in the Azure cloud. Once running, Docker can run a containerized application in the Photon OS instance.
4
-
5
-**Note:** These instructions apply to Photon OS 2.0. There is no Photon OS 1.0 distribution image for Microsoft Azure.
6
-
7
-- [About Photon OS](#about-photon-os)
8
-- [Prerequisites](#prerequisites)
9
-- [Downloading and Extracting the Photon OS VHD File](#downloading-and-extracting-the-photon-os-vhd-file)
10
-- [Setting Up Azure Storage and Uploading the VHD](#setting-up-azure-storage-and-uploading-the-vhd)
11
-- [Deploying a Containerized Application in Photon OS](#deploying-a-containerized-application-in-photon-os)
12
-
13
-# About Photon OS
14
-
15
-Photon OS™ is an open source Linux container host optimized for cloud-native applications, cloud platforms, and VMware infrastructure. Photon OS provides a secure run-time environment for efficiently running containers. For an overview, see  [https://vmware.github.io/photon/](https://vmware.github.io/photon/).
16
-
17
-# Prerequisites
18
-
19
-- Microsoft Azure account ([sign up](https://azure.microsoft.com) if you don&#39;t already have one)
20
-- Azure CLI 2.0 (install the latest version) - see  [Install Azure CLI 2.0](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest) and  [Get started with Azure CLI 2.0](https://docs.microsoft.com/en-us/cli/azure/get-started-with-azure-cli?view=azure-cli-latest).
21
-- Pair of SSH public / private keys
22
-
23
-# Downloading and Extracting the Photon OS VHD File
24
-
25
-VMware packages Photon OS as a cloud-ready virtual hard disk (VHD file) that you can download for free from  [Bintray](https://bintray.com/vmware/photon). This VHD file is a virtual appliance with the information and packages that Azure needs to launch an instance of Photon in the cloud. After you have downloaded the distribution archive, extract the VHD file from it. You will later need to upload this VHD file to Azure, where it will be stored in an Azure storage account. For download instructions, see [Downloading Photon OS](https://github.com/vmware/photon/wiki/Downloading-Photon-OS).
26
-
27
-# Setting Up Azure Storage and Uploading the VHD
28
-
29
-You can use either the Azure Portal or the Azure CLI to set up your Azure storage space, upload the Photon OS VHD file, and create the Photon OS VM.
30
-
31
-## Setting Up Using the Azure Portal
32
-
33
-You can use the Azure portal to set up Photon OS 2.0 in the Azure cloud. The following instructions are brief. Refer to the Azure documentation for details.
34
-
35
-1. Log in to the Azure portal at  [http://portal.azure.com](http://portal.azure.com/).
36
-2. Create a resource group. In the toolbar, choose Resource Groups, click **+Add** , fill in the resource group fields, and choose **Create**.
37
-3. Create a storage account. In the toolbar, choose Storage Accounts, click **+Add** , fill in the storage account fields (and the resource group you just created), and choose **Create**.
38
-4. Select the storage account.
39
-5. Scroll down the storage account control bar, click Containers (below BLOB SERVICE), click **+Container** , fill in the container fields, and choose **Create**.
40
-6. Select the container you just created.
41
-7. Click **Upload** and upload the Photon OS VHD image file to this container.
42
-8. Once the VHD file is uploaded, refer to the Azure documentation for instructions on how to create and manage your Photon OS VM.
43
-
44
-## Setting Up Using the Azure CLI
45
-
46
-You can use the Azure CLI 2.0 to set up Photon OS. You must first  [Install Azure CLI 2.0](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest).
47
-
48
-**Note:**  Except where overridden with parameter values, these commands create objects with default settings.
49
-
50
-### Step 1: Create a Resource Group
51
-
52
-From the Azure CLI, create a resource group.
53
-~~~~
54
-az group create \
55
- --name &lt;your_resource_group&gt; \
56
- --location westus
57
-~~~~
58
-### Step 2: Create a Storage Account
59
-
60
-Create a storage account associated with this resource group.
61
-~~~~
62
-az storage account create \
63
-    --resource-group &lt;your_resource_group&gt; \
64
-    --location westus \
65
-    --name &lt;your_account_name&gt; \
66
-    --kind Storage \
67
-    --sku Standard_LRS
68
-~~~~
69
-### Step 3: List the Keys for the Storage Account
70
-
71
-Retrieve the keys associated with your newly created storage account.
72
-~~~~
73
-az storage account keys list \
74
-    --resource-group &lt;your_resource_group&gt; \
75
-    --account-name &lt;your_account_name&gt;
76
-~~~~
77
-### Step 4: Create the Storage Container
78
-
79
-Create a storage container associated with your newly created storage account.
80
-
81
-**Note:** The sample create.sh script, described below, does this for you programmatically.
82
-~~~~
83
-az storage container create \
84
-    --account-name &lt;your_account_name&gt; \
85
-    --name &lt;your_container_name&gt;
86
-~~~~
87
-### Step 5: Verify Your Setup in the Azure Portal
88
-
89
-1. Log into the Azure portal using your account credentials.
90
-2. From the left toolbar, click **Storage Accounts**. You should see your storage accounts.
91
-3. Select the storage account.
92
-4. Scroll down the storage account control bar and click **Containers** (below BLOB SERVICE). You should see the container you created.
93
-
94
-### Step 6: Upload the Photon OS Distribution to Your Storage Container
95
-
96
-The Photon OS distribution for Azure is 16GB. You can download it locally or to a mounted, shared location.
97
-~~~~
98
-az storage blob upload \
99
-    --account-name &lt;your_account_name&gt; \
100
-    --account-key &lt;your_account_key&gt; \
101
-    --container-name &lt;your_container_name&gt; \
102
-    --type page \
103
-    --file &lt;vhd_path&gt; \
104
-    --name &lt;vm_name&gt;.vhd
105
-~~~~
106
-### Example Setup Script
107
-
108
-You can use the following script (create.sh) to upload your VHD file programmatically and create the VM. Before you run it, specify the following settings:
109
-
110
-- resource_group name
111
-- account_name
112
-- account_key (public or private)
113
-- container_name
114
-- public_key_file
115
-- vhd_path and and vm_name of the Photon OS VHD distribution file
116
-
117
-This script returns the complete IP address of the newly created VM.
118
-~~~~
119
-#!/bin/bash
120
-vhd_path=$1
121
-vm_name=$2
122
-export PATH=$PATH:/root/azure_new/bin/az
123
-echo PATH=$PATH
124
-resource_group=&quot;&quot;
125
-account_name=&quot;&quot;
126
-account_key=&quot;&quot;
127
-container_name=&quot;mydisks&quot;
128
-url=&quot;https://${account_name}.blob.core.windows.net/${container_name}/${vm_name}.vhd&quot;
129
-public_key_file=&quot;/root/azure_new/jenkins.pub&quot;
130
-echo &quot;########################&quot;
131
-echo &quot;#   Create container   #&quot;
132
-echo &quot;########################&quot;
133
-/root/azure_new/bin/az storage container create --account-name ${account_name} --name ${container_name}
134
-echo &quot;##################&quot;
135
-echo &quot;#   Upload vhd   #&quot;
136
-echo &quot;##################&quot;
137
-/root/azure_new/bin/az storage blob upload --account-name ${account_name} \
138
-    --account-key ${account_key} \
139
-    --container-name ${container_name} \
140
-    --type page \
141
-    --file ${vhd_path} \
142
-    --name ${vm_name}.vhd
143
-echo &quot;##################&quot;
144
-echo &quot;#   Create vm    #&quot;
145
-echo &quot;##################&quot;
146
-echo &quot;az vm create --resource-group ${resource_group} --location westus --name ${vm_name} --storage-account ${account_name} --os-type linux --admin-username michellew --ssh-key-value ${public_key_file} --image ${url} --use-unmanaged-disk ... ...&quot;
147
-/root/azure_new/bin/az vm create --resource-group ${resource_group} --location westus --name ${vm_name} --storage-account ${account_name} --os-type linux --admin-username michellew --ssh-key-value ${public_key_file} --image ${url} --use-unmanaged-disk
148
-~~~~
149
-## Removing Photon OS from Azure
150
-
151
-You can use the following delete.sh script to programmatically (and silently) remove the VM instance, VHD file, and container.
152
-
153
-**Note:**  Consider deleting idle VMs so that you are not charged when not in use.
154
-
155
-Before you run it, specify the following settings:
156
-
157
-- resource_group name (from step 1, above)
158
-- account_name (from step 2, above)
159
-- account_key (public or private) (from step 3, above)
160
-- container_name (from step 4, above)
161
-- public_key_file
162
-- vm_name of the Photon OS VHD distribution file
163
-
164
-**delete.sh**
165
-
166
-~~~~
167
-#!/bin/bash
168
-vm_name=$1
169
-resource_group=&quot;&quot;
170
-account_name=&quot;&quot;
171
-account_key=&quot;&quot;
172
-container_name=&quot;mydisks&quot;
173
-url=&quot;https://${account_name}.blob.core.windows.net/${container_name}/${vm_name}.vhd&quot;
174
-public_key_file=&quot;/root/azure_new/jenkins.pub&quot;
175
-exit_code=0
176
-echo &quot;##################&quot;
177
-echo &quot;#   Delete vm    #&quot;
178
-echo &quot;##################&quot;
179
-echo &quot;az vm list  --resource-group ${resource_group} ... ...&quot;
180
-/root/azure_new/bin/az vm list  --resource-group ${resource_group}
181
-echo &quot;az vm delete --resource-group ${resource_group} --name ${vm_name} --yes ... ...&quot;
182
-/root/azure_new/bin/az vm delete --resource-group ${resource_group} --name ${vm_name} --yes
183
-if [$? -ne 0];then
184
-   exit_code=1
185
-fi
186
-echo &quot;az vm list  --resource-group ${resource_group} ... ...&quot;
187
-/root/azure_new/bin/az vm list  --resource-group ${resource_group}
188
-echo &quot;##############$####&quot;
189
-echo &quot;#   Delete vhd    #&quot;
190
-echo &quot;###############$###&quot;
191
-echo &quot;az storage blob list --account-name ${account_name} --container-name ${container_name} ... ...&quot;
192
-/root/azure_new/bin/az storage blob list --account-name ${account_name} --container-name ${container_name}
193
-echo &quot;az storage blob delete --account-name ${account_name} --container-name ${container_name} --name ${vm_name}.vhd ... ...&quot;
194
-/root/azure_new/bin/az storage blob delete --account-name ${account_name} --container-name ${container_name} --name ${vm_name}.vhd
195
-if [$? -ne 0];then
196
-   exit_code=1
197
-fi
198
-echo &quot;az storage blob list --account-name ${account_name} --container-name ${container_name} ... ...&quot;
199
-/root/azure_new/bin/az storage blob list --account-name ${account_name} --container-name ${container_name}
200
-echo &quot;########################&quot;
201
-echo &quot;#   Delete container   #&quot;
202
-echo &quot;########################&quot;
203
-/root/azure_new/bin/az storage container delete --account-name ${account_name} --name ${container_name}
204
-/root/azure_new/bin/az storage container delete --account-name ${account_name} --name vhds
205
-exit ${exit_code}
206
-~~~~
207
-# Deploying a Containerized Application in Photon OS
208
-
209
-Now that you have your container runtime environment up and running, you can easily deploy a containerized application. For this example, you will deploy the popular open source Web Server Nginx. The Nginx application has a customized VMware package that is published as a dockerfile and can be downloaded, directly, through the Docker module from the Docker Hub.
210
-
211
-## Step 1: Run Docker
212
-
213
-To run Docker from the command prompt, enter the following command, which initializes the docker engine:
214
-~~~~
215
-systemctl start docker
216
-~~~~
217
-To ensure Docker daemon service runs on every subsequent VM reboot, enter the following command:
218
-~~~~
219
-systemctl enable docker
220
-~~~~
221
-## Step 2: Run the Nginx Web Server
222
-
223
-Now the Docker daemon service is running, it is a simple task to &quot;pull&quot; and start the Nginx Web Server container from Docker Hub. To do this, type the following command:
224
-~~~~
225
-docker run -d -p 80:80 vmwarecna/nginx
226
-~~~~
227
-This pulls the Nginx Web Server files and appropriate dependent container filesystem layers required for this containerized application to run.
228
-
229
-[[/images/azure-docker-run.png]]
230
-
231
-After the &quot;docker run&quot; process completes, you return to the command prompt. You now have a fully active website up and running in a container.
232
-
233
-## Step 3: Test the Web Server
234
-
235
-**Note** : Please make sure that the proper security policies have been enabled on the Microsoft Azure side to enable traffic to port 80 on the VM.
236
-
237
-To test that your Web Server is active:
238
-
239
-1. Run the ifconfig command to get the IP address of the Photon OS Virtual Machine.
240
-The output displays a list of adapters that are connected to the virtual machine. Typically, the web server daemon will be bound on &quot;eth0.&quot;
241
-2. Start a browser on your host machine and enter the IP address of your Photon OS Virtual Machine.
242
-3. You should see a screen confirming that the nginx web server is successfully installed and working.
243
-
244
-You can now run any other containerized application from Docker Hub or your own containerized application within Photon OS.
245 1
\ No newline at end of file
246 2
deleted file mode 100644
... ...
@@ -1,357 +0,0 @@
1
-This guide describes how to get started using Photon OS as a virtual machine within VMware Workstation. It provides instructions for downloading Photon OS (as an OVA or ISO file), describes the various installation options, and walks through the steps of installing the Photon OS distribution on Workstation. Once Photon OS is installed, this document shows how to deploy a containerized application in Docker with a single command.
2
-
3
-- [About Photon OS](#about-photon-os)
4
-- [Requirements](#requirements)
5
-- [Deciding Whether to Use OVA or ISO](#deciding-whether-to-use-ova-or-iso)
6
-- [Downloading Photon OS](#downloading-photon-os)
7
-- [Importing the OVA for Photon OS 2.0](#importing-the-ova-for-photon-os-20)
8
-- [Installing the ISO Image for Photon OS 2.0](#installing-the-iso-image-for-photon-os-20)
9
-- [Deploying a Containerized Application in Photon OS](#deploying-a-containerized-application-in-photon-os)
10
-- [Installing Photon OS 1.0](#installing-photon-os-10)
11
-
12
-**Note**: If you want to upgrade an existing Photon 1.0 VM, refer to the instructions in [Upgrading to Photon OS 2.0](https://github.com/vmware/photon/wiki/Upgrading-to-Photon-OS-2.0). 
13
-
14
-# About Photon OS
15
-
16

                
17
-
18
-# Requirements
19
-
20
-Using Photon OS within VMware Workstation requires the following resources:
21
-
22
-| **Resource** | **Description** |
23
-| --- | --- |
24
-| VMware Workstation | VMware Workstation must be installed (Workstation 10 or higher). The latest version is recommended. |
25
-| Memory | 2GB of free RAM (recommended) |
26
-| Storage | **Minimal Photon install** : 512MB of free space (minimum); **Full Photon install** : 4GB of free space (minimum); 8GB is recommended |
27
-| Distribution File | Photon OS ISO or OVA file downloaded from bintray ([https://bintray.com/vmware/photon/](https://bintray.com/vmware/photon/)).
28
-
29
-Resource requirements and recommendations vary depending on several factors, including the host environment (for example, VMware Workstation and VMware vSphere), the distribution file used (ISO or OVA), and the selected installation settings (for example, full or basic installation).
30
-
31
-**Note:**  The setup instructions in this guide use VMware Workstation Professional version 12.5.7.
32
-
33
-[[/images/ws_version.png]]
34
-
35
-# Deciding Whether to Use OVA or ISO
36
-
37
-The first step is decide whether to use the the OVA or ISO distribution to set up Photon OS.
38
-
39
-- **OVA import** : Because of the nature of an OVA, you&#39;re getting a pre-installed version of Photon OS. For Workstation, choose the OVA with Hardware Version 11 (_not_ 13). The OVA benefits from a simple import process and some kernel tuning for VMware environments. However, because it&#39;s a pre-installed version, the set of packages that are installed are predetermined. Any additional packages that you need can be installed using tdnf.
40
-- **ISO install** : The ISO, on the other hand, allows for a more complete installation or automated installation via kickstart.
41
-
42
-If you&#39;re just looking for the fastest way to get up and running, start with the OVA.
43
-
44
-# Downloading Photon OS
45
-
46
-Once you&#39;ve decided which way to install, you&#39;ll need to download the correct binaries. Go to the following Bintray URL and download the latest release of Photon OS:
47
-
48
-[https://bintray.com/vmware/photon/](https://bintray.com/vmware/photon/)
49
-
50
-For instructions, see  [Downloading Photon OS](https://github.com/vmware/photon/wiki/Downloading-Photon-OS).
51
-
52
-# Importing the OVA for Photon OS 2.0
53
-
54
-Using the OVA is the easiest way to create a Photon OS VM on VMware Workstation.
55
-
56
-## Step 1: Start the Import Process
57
-
58
-After you&#39;ve downloaded the OVA file (OVA with Hardware Version 11), do one of the following:
59
-
60
-- Double-click it to start the import process, or
61
-- Start VMware Workstation and, from the File menu, choose **Open**.
62
-
63
-[[/images/ws-ova-import.png]]
64
-
65
-## Step 2: Specify the Name and Storage Location
66
-
67
-Change the name and storage location, if you want.
68
-
69
-[[/images/ws-ova-path.png]]
70
-
71
-Choose **Import**.
72
-
73
-[[/images/ws-ova-license.png]]
74
-
75
-Review the License Agreement and choose **Accept**.
76
-
77
-## Step 3: Configure VM Settings
78
-
79
-Once the OVA is imported, Workstation displays a summary of the settings for your Photon OS VM.
80
-
81
-[[/images/ws-ova-settings.png]]
82
-
83
-Choose **Edit virtual machine settings**. Workstation displays the Virtual Machine settings. You can either accept the defaults or change settings as needed.
84
-
85
-[[/images/ws-ova-settings-edit.png]]
86
-
87
-Select the Options tab.
88
-
89
-[[/images/ws-ova-settings-options.png]]
90
-
91
-Under Guest operating system, select **Linux**.
92
-
93
-For Version, click the list and select **VMWare Photon 64-bit**.
94
-
95
-[[/images/ws-ova-os.png]]
96
-
97
-**Note:**  If you want to configure a secure boot for the Photon OS VM, select **Advanced**  and select (check) **Boot with EFI instead of BIOS**. The EFI boot ensures that the ISO content is signed by VMware and that the entire stack is secure.
98
-
99
-[[/images/ws-ova-settings-efi.png]]
100
-
101
-Choose **OK**.
102
-
103
-## Step 4: Power on the VM
104
-
105
-From the tab, choose  **Power on this virtual machine**.
106
-
107
-[[/images/ws-ova-splash.png]]
108
-
109
-After the splash screen, Workstation will prompt you to log in.
110
-
111
-## Step 5: Update Login Credentials
112
-
113
-**Note** : Because of limitations within OVA support on Workstation, it was necessary to specify a default password for the OVA option. However, all Photon OS instances that are created by importing the OVA will require an immediate password change upon login. The default account credentials are:
114
-
115
-| **Setting** | **Value** |
116
-| --- | --- |
117
-| Username | ``root`` |
118
-| Password | ``changeme`` |
119
-
120
-After you provide these credentials, Workstation prompts you to create a new password and type it a second time to verify it. For security, Photon OS forbids common dictionary words for the root password. Once logged in, you will see the shell prompt.
121
-
122
-[[/images/ws-ova-password.png]]
123
-
124
-Once complete, proceed to [Deploying a Containerized Application in Photon OS](#deploying-a-containerized-application-in-photon-os).
125
-
126
-# Installing the ISO Image for Photon OS 2.0
127
-
128
-After you have downloaded the Photon OS ISO image into a folder of your choice, open VMware Workstation.
129
-
130
-## Step 1: Start the Installation Process
131
-
132
-From the File menu, choose **New Virtual Machine**  to create a new virtual machine.
133
-
134
-[[/images/ws-iso-new.png]]
135
-
136
-Select **Typical** or **Custom**, and then choose **Next**. These instructions refer to a Typical installation.
137
-
138
-[[/images/ws-iso-typical.png]]
139
-
140
-## Step 2: Select the ISO Image
141
-
142
-Select **Installer disc image file (iso)**, choose **Browse** and select the Photon OS ISO file.
143
-
144
-[[/images/ws-iso-selected.png]]
145
-
146
-## Step 3: Select the Operating System
147
-
148
-Choose **Next**. Select the Guest operating system.
149
-
150
-For the Guest operating system, select **Linux**.
151
-
152
-Click the Version dropdown and select **VMware Photon 64-bit**  from the list.
153
-
154
-[[/images/ws-iso-os.png]]
155
-
156
-## Step 4: Specify the VM Name and Location
157
-
158
-Choose **Next**. Specify a virtual machine name and location.
159
-
160
-[[/images/ws-iso-name.png]]
161
-
162
-## Step 5: Specify Disk Options
163
-
164
-Choose **Next**. Specify the maximum disk size and whether you want to split the virtual disk into multiple files or store it as a single file.
165
-
166
-[[/images/ws-iso-disk.png]]
167
-
168
-## Step 6: Configure VM Settings
169
-
170
-Choose **Next**. Workstation displays a summary of your selections.
171
-
172
-[[/images/ws-iso-summary.png]]
173
-
174
-**Important** : _Before_ you finish creating the Photon OS Virtual Machine, we strongly recommend that you customize the virtual machine and remove any unwanted devices that are not needed for a container run-time environment. To remove unnecessary devices, choose **Customize hardware**.
175
-
176
-[[/images/ws-iso-customize.png]]
177
-
178
-Consider removing the following components, which are not used by Photon OS:
179
-
180
-- Select **Sound Card**, un-tick the **Connect at power on** option. Confirm your action and choose **Close** to return to the VM Settings by .
181
-- Select **USB Controller** and ensure that the **Share Bluetooth devices with the virtual machine** setting is unchecked (it should be unchecked, by default) and then choose **Close**.
182
-- Select **Display** and ensure that the **Accelerate 3D Graphics** option is unchecked (it should be unchecked, by default) and then choose **Close**.
183
-- At this stage we have now made all the necessary customizations and you are ready to select the Photon OS ISO image to boot and begin the installation process.
184
-- Choose  **Finish**.
185
-
186
-In Workstation, choose **Edit virtual machine settings**, select **CD/DVD (IDE)**, and verify that **Connect at power on** is selected.
187
-
188
-[[/images/ws-iso-cd.png]]
189
-
190
-## Step 7: Configure a Secure Boot (Optional)
191
-
192
-**Note:**  If you want to configure a secure boot for the Photon OS VM, in Workstation, choose  **Edit virtual machine settings**, select  **Options**, choose **Advanced**, and select **Boot with EFI instead of BIOS**.
193
-
194
-[[/images/ws-iso-efi.png]]
195
-
196
-The EFI boot ensures that the ISO content is signed by VMware and that the entire stack is secure.
197
-
198
-Choose **OK**.
199
-
200
-[[/images/ws-iso-settings.png]]
201
-
202
-## Step 8: Power On the VM
203
-
204
-Choose **Power on this virtual machine**.
205
-
206
-When you see the Photon Installer boot menu, press Enter on your keyboard to start installing.
207
-
208
-[[/images/ws-iso-installer.png]]
209
-
210
-Review the license agreement.
211
-
212
-[[/images/ws-iso-license.png]]
213
-
214
-Choose **Accept** and press Enter.
215
-
216
-## Step 9: Configure the Partition
217
-
218
-The installer will detect one disk, which should be the 8GB volume configured as part of the virtual machine creation. Choose **Auto**  to have the installer automatically allocate the partition, or choose **Custom**  if you want to configure individual partitions, and then press the Enter key.
219
-
220
-[[/images/ws-iso-disk-partition.png]]
221
-
222
-**Note:**  If you choose Custom, the installer displays the following screen.
223
-
224
-[[/images/ws-iso-disk-partition-custom.png]]
225
-
226
-For each custom partition, choose **Create New**  and specify the following information:
227
-
228
-[[/images/ws-iso-disk-partition-new.png]]
229
-
230
-**Size** - Preallocated size of this partition, in MB.
231
-
232
-**Type** - One of the following options:
233
-
234
-- **ext3** - ext3 file system
235
-- **ext4** - ext4 file system
236
-- **swap** - swap partition
237
-
238
-**Mountpoint** - Mount point for this partition.
239
-
240
-Choose **OK** and press the Enter key. When you are done defining custom partitions, choose **Next** and press the Enter key.
241
-
242
-The installer prompts you to confirm that you want to erase the entire disk. Choose  **Yes**  and press the Enter key.
243
-
244
-[[/images/ws-iso-disk-erase.png]]
245
-
246
-## Step 10: Select an Installation Option
247
-
248
-After partitioning the disk, the installer will prompt you to select an installation option.
249
-
250
-[[/images/ws-iso-install-option.png]]
251
-
252
-Each installation option provides a different run-time environment, depending on your requirements.
253
-
254
-| **Option** | **Description** |
255
-| --- | --- |
256
-| **Photon Minimal** | Photon Minimum is a very lightweight version of the container host runtime that is best suited for container management and hosting. There is sufficient packaging and functionality to allow most common operations around modifying existing containers, as well as being a highly performant and full-featured runtime. |
257
-| **Photon Full** | Photon Full includes several additional packages to enhance the authoring and packaging of containerized applications and/or system customization. For simply running containers, Photon Full will be overkill. Use Photon Full for developing and packaging the application that will be run as a container, as well as authoring the container, itself. For testing and validation purposes, Photon Full will include all components necessary to run containers. |
258
-| **Photon OSTree Server** | This installation profile will create the server instance that will host the filesystem tree and managed definitions for rpm-ostree managed hosts created with the &quot;Photon OSTree Host&quot; installation profile. Most environments should need only one Photon OSTree Server instance to manage the state of the Photon OSTree Hosts. Use Photon OSTree Server when you are establishing a new repository and management node for Photon OS hosts. |
259
-
260
-**Note:**  The option you choose determines the disk and memory resources required for your installation.
261
-
262
-Select the option you want and press the Enter key.
263
-
264
-## Step 11: Select the Linux Kernel
265
-
266
-Select a Linux kernel to install.
267
-
268
-[[/images/ws-iso-kernel.png]]
269
-
270
-- **Hypervisor optimized** means that any components that are not needed for running under a VMware hypervisor have been removed for faster boot times.
271
-- **Generic** means that all components are included.
272
-
273
-Choose **Next** and press the Enter key.
274
-
275
-## Step 12: Specify the Hostname
276
-
277
-The installer prompts you for a hostname and suggest a randomly generated, unique hostname that you can change if you want.
278
-
279
-[[/images/ws-iso-hostname.png]]
280
-
281
-Press the Enter key.
282
-
283
-## Step 13: Specify the System root Password
284
-
285
-**_Note_** _: Photon OS will not permit commonly used dictionary words to be set as a root password._
286
-
287
-The installer prompts you to enter the system root password. Type the password and press the Enter key.
288
-
289
-[[/images/ws-iso-root-password.png]]
290
-
291
-The installer prompts you to confirm the root password by typing it a second time.
292
-
293
-[[/images/ws-iso-root-password-confirm.png]]
294
-
295
-Press the Enter key. The installer proceeds to install the software. Installation times will vary based on the system hardware and installation options you selected. Most installations complete in less than one minute.
296
-
297
-## Step 14: Reboot the VM and Log In
298
-
299
-Once finished, the installer displays a confirmation message (which includes how long it took to install Photon OS) and prompts you to press a key on your keyboard to boot the new VM.
300
-
301
-[[/images/ws-iso-installed.png]]
302
-
303
-Press any key on the keyboard and the virtual machine will reboot into Photon OS.
304
-
305
-As the initial boot process begins, the installer displays the Photon splash screen, and then a login prompt.
306
-
307
-[[/images/ws-iso-splash.png]]
308
-
309
-At the login prompt, type **root**  as the username and provide the password chosen during the installation.
310
-
311
-[[/images/ws-iso-login.png]]
312
-
313
-You have now successfully set up Photon OS and are ready to use your container run-time environment. Proceed to the next section to deploy a containerized application.
314
-
315
-# Deploying a Containerized Application in Photon OS
316
-
317
-Now that you have your container runtime environment up and running, you can easily deploy a containerized application. For this example, you will deploy the popular open source Web Server Nginx. The Nginx application has a customized VMware package that is published as a dockerfile and can be downloaded directly through the Docker module from the Docker Hub.
318
-
319
-## Step 1: Run Docker
320
-
321
-To run Docker from the command prompt, enter the following command, which initializes the docker engine:
322
-
323
-    systemctl start docker
324
-
325
-To ensure Docker daemon service runs on every subsequent VM reboot, enter the following command:
326
-
327
-    systemctl enable docker
328
-
329
-## Step 2: Run the Nginx Web Server
330
-
331
-Now the Docker daemon service is running, it is a simple task to &quot;pull&quot; and start the Nginx Web Server container from Docker Hub. To do this, type the following command:
332
-
333
-    docker run -d -p 80:80 vmwarecna/nginx
334
-
335
-This pulls the Nginx Web Server files and appropriate dependent container filesystem layers required for this containerized application to run.
336
-
337
-[[/images/ws-docker-run.png]]
338
-
339
-After the **docker run**  process completes, you return to the command prompt. You now have a fully active website up and running in a container.
340
-
341
-## Step 3: Test the Web Server
342
-
343
-To test that your Web Server is active, run the **ifconfig** command to get the IP address of the Photon OS Virtual Machine.
344
-
345
-[[/images/ws-docker-ifconfig.png]]
346
-
347
-The output displays a list of adapters that are connected to the virtual machine. Typically, the web server daemon will be bound on &quot; **eth0**&quot;.
348
-
349
-Start a browser on your host machine and enter the IP address of your Photon OS Virtual Machine (the **inet addr** for eth0). You should see a screen similar to the following example as confirmation that your web server is active.
350
-
351
-[[/images/ws-docker-confirm.png]]
352
-
353
-You can now run any other containerized application from Docker Hub or your own containerized application within Photon OS.
354
-
355
-# Installing Photon OS 1.0
356
-
357
-Refer to the Photon OS 1.0 installation instructions in [Running Photon OS on Fusion](https://github.com/vmware/photon/wiki/Running-Project-Photon-on-Fusion).
358 1
\ No newline at end of file
359 2
deleted file mode 100644
... ...
@@ -1,501 +0,0 @@
1
-This guide describes how to get started using Photon OS as a virtual machine within VMware vSphere. It provides instructions for downloading Photon OS (as an OVA or ISO file), describes the various installation options, and walks through the steps of installing the Photon OS distribution on vSphere. Once Photon OS is installed, this document highlights how to deploy a containerized application in Docker with a single command.
2
-
3
-- [About Photon OS](#about-photon-os)
4
-- [Deciding Whether to Use OVA or ISO](#deciding-whether-to-use-ova-or-iso)
5
-- [Downloading Photon OS](#downloading-photon-os)
6
-- [Importing the OVA for Photon OS 2.0](#importing-the-ova-for-photon-os-20)
7
-- [Installing the ISO Image for Photon OS 2.0](#installing-the-iso-image-for-photon-os-20)
8
-- [Deploying a Containerized Application in Photon OS](#deploying-a-containerized-application-in-photon-os)
9
-- [Installing Photon OS v1.0](#installing-photon-os-10)
10
-
11
-**Note**: If you want to upgrade an existing Photon 1.0 VM, refer to the instructions in [Upgrading to Photon OS 2.0](https://github.com/vmware/photon/wiki/Upgrading-to-Photon-OS-2.0). 
12
-
13
-# About Photon OS
14
-
15
-Photon OS™ is an open source Linux container host optimized for cloud-native applications, cloud platforms, and VMware infrastructure. Photon OS provides a secure run-time environment for efficiently running containers. For an overview, see  [https://vmware.github.io/photon/](https://vmware.github.io/photon/).
16
-
17
-# Requirements
18
-
19
-Using Photon OS within VMware vSphere requires the following resources:
20
-
21
-| **Resources** | **Description** |
22
-| --- | --- |
23
-| VMware vSphere installed | VMware web client (v6.5) for ESXi hosts (recommended) **Note:** vSphere 6 and vSphere 5.5 (these clients provide limited support; not all features are available). |
24
-| Memory | ESXi host with 2GB of free RAM (recommended) |
25
-| Storage | **Minimal Photon install** : ESXi host with at least 512MB of free space (minimum); **Full Photon install** : ESXi host with at least 4GB of free space (minimum); 16GB is recommended |
26
-| Distribution File | Photon OS ISO or OVA file downloaded from Bintray |
27
-
28
-Resource requirements and recommendations vary depending on several factors, including the host environment (for example, VMware vSphere and VMware Fusion), the distribution file used (ISO or OVA), and the selected installation settings (for example, full or basic installation).
29
-
30
-**Note:** The setup instructions in this guide use VMware vSphere 6 and the vSphere web client.
31
-
32
-# Deciding Whether to Use OVA or ISO
33
-
34
-The first step is decide whether to use the OVA or ISO distribution to set up Photon OS.
35
-
36
-- **OVA import** : Because of the nature of an OVA, you&#39;re getting a pre-installed version of Photon OS. You can choose the hardware version you want (OVA with hardware version 13 or 11). The OVA benefits from a simple import process and some kernel tuning for VMware environments. However, because it&#39;s a pre-installed version, the set of packages that are installed are predetermined. Any additional packages that you need can be installed using tdnf.
37
-- **ISO install** : The ISO, on the other hand, allows for a more complete installation or automated installation via kickstart.
38
-
39
-If you&#39;re just looking for the fastest way to get up and running, start with the OVA.
40
-
41
-# Downloading Photon OS
42
-
43
-Once you&#39;ve decided which way to install, you&#39;ll need to download the correct binaries. Go to the following Bintray URL and download the latest release of Photon OS:
44
-
45
-[https://bintray.com/vmware/photon/](https://bintray.com/vmware/photon/)
46
-
47
-For instructions, see [Downloading Photon OS](https://github.com/vmware/photon/wiki/Downloading-Photon-OS).
48
-
49
-**Note:** For ISO installation, you will need to upload to a datashare that is attached to the ESXi host, or mount the file share (where the ISO resides) as a data store.
50
-
51
-# Importing the OVA for Photon OS 2.0
52
-
53
-Using the OVA is a fast and easy way to create a Photon OS VM on VMware vSphere.
54
-
55
-After you&#39;ve downloaded the OVA, log in to your vSphere environment.
56
-
57
-## Step 1: Start the Import Process
58
-
59
-From the Actions pull-down menu, choose **Create/Register VM**.
60
-
61
-[[/images/vs-ova-new-vm.png]]
62
-
63
-In the Select creation type window, choose  **Deploy a virtual machine from an OVF or OVA file**.
64
-
65
-[[/images/vs-ova-new-vm-ova.png]]
66
-
67
-Choose **Next**.
68
-
69
-## Step 2: Select the OVA File
70
-
71
-Enter a name for the virtual machine, and select the OVA file.
72
-
73
-[[/images/vs-ova-name-selected.png]]
74
-
75
-Choose **Next**.
76
-
77
-## Step 3: Specify the Target Datastore
78
-
79
-From the Select storage screen, select the target datastore for your VM.
80
-
81
-[[/images/vs-ova-storage.png]]
82
-
83
-Choose  **Next**.
84
-
85
-## Step 4: Accept the License Agreement
86
-
87
-Read through the Photon OS License Agreement, and then choose **I Agree**.
88
-
89
-[[/images/vs-ova-license.png]]
90
-
91
-Choose **Next**.
92
-
93
-## Step 5: Select Deployment Options
94
-
95
-Select deployment options.
96
-
97
-[[/images/vs-ova-deployment-options.png]]
98
-
99
-Photon OS is provisioned with a maximum disk size. By default, Photon OS uses only the portion of disk space that it needs, usually much less that the entire disk size ( **Thin** client). If you want to pre-allocate the entire disk size (reserving it entirely for Photon OS instead), select **Thick**  instead.
100
-
101
-Choose **Next**.
102
-
103
-## Step 6: Verify Deployment Settings
104
-
105
-Verify your deployment settings.
106
-
107
-[[/images/vs-ova-settings.png]]
108
-
109
-Click **Finish**. vSphere uploads and validates your OVA. Depending on bandwidth, this operation might take a while.
110
-
111
-When finished, vShield powers up a new VM based on your selections.
112
-
113
-## Step 7: Change Login Settings
114
-
115
-[[/images/vs-ova-splash.png]]
116
-
117
-After the VM is booted, open the command window. vSphere prompts you to log in.
118
-
119
-**Note**: Because of limitations within OVA support on vSphere, it was necessary to specify a default password for the OVA option. However, all Photon OS instances that are created by importing the OVA will require an immediate password change upon login. The default account credentials are:
120
-
121
-| **Setting** | **Value** |
122
-| --- | --- |
123
-| Username | ``root`` |
124
-| Password | ``changeme`` |
125
-
126
-After you provide these credentials, vSphere prompts you to create a new password and type it a second time to verify it.
127
-
128
-**Note:** For security, Photon OS forbids common dictionary words for the root password.  
129
-
130
-Once logged in, you will see the shell prompt.
131
-
132
-[[/images/vs-ova-login.png]]
133
-
134
-Once complete, proceed to [Deploying a Containerized Application in Photon OS](#deploying-a-containerized-application-in-photon-os).
135
-
136
-## Step 9: Export the VM as a Template (Optional)
137
-
138
-Consider converting this imported VM into a template (from the Actions menu, choose **Export** ) so that you have a master Photon OS instance that can be combined with vSphere Guest Customization to enable rapid provisioning of Photon OS instances.
139
-
140
-# Installing the ISO Image for Photon OS 2.0
141
-
142
-After you have downloaded the Photon OS ISO image into a folder of your choice, complete the following steps.
143
-
144
-## Step 1: Upload the ISO Image
145
-
146
-Upload the ISO image to a datastore that is attached to the host on which you&#39;ll create the Photon OS virtual machine.
147
-
148
-## Step 2: Create a New VM
149
-
150
-Log in to your vSphere environment. In the Virtual Machines window, choose **Create/Register VM**.
151
-
152
-On the Select creation type screen, select **Create a new virtual machine**.
153
-
154
-[[/images/vs-iso-new.png]]
155
-
156
-Choose **Next**.
157
-
158
-## Step 3: Configure VM Settings
159
-
160
-Specify a VM name.
161
-
162
-[[/images/vs-iso-name.png]]
163
-
164
-Specify a guest operating system.
165
-
166
-- For Compatibility, select **ESXi 6.5**.
167
-- For Guest OS family, select **Linux**.
168
-- For Guest OS version, select **VMware Photon OS (64-bit)**.
169
-
170
-[[/images/vs-iso-os.png]]
171
-
172
-Choose  **Next**.
173
-
174
-## Step 4: Select the Target Datastore
175
-
176
-Select the datastore where you want to store the VM.
177
-
178
-[[/images/vs-iso-datastore.png]]
179
-
180
-Click **Next**.
181
-
182
-## Step 5: Customize VM Settings
183
-
184
-Customize the virtual machine settings.
185
-
186
-[[/images/vs-iso-customize.png]]
187
-
188
-For CD/DVD Drive 1, click the drop-down and select **Datastore ISO file**.
189
-
190
-In the Datastore browser, select the ISO that you want to import.
191
-
192
-Change other settings as applicable.
193
-
194
-- The recommended virtual hardware settings for your Photon VM are heavily dependent upon the container load you intend to run within Photon OS – more containers or more intensive containers will require you to adjust these settings for your application load. VMware suggests 2 vCPU, 1024MB memory, 20GB hard disk. Any unwanted devices should be removed. Be sure to mount the Photon OS ISO on the CD/DVD Drive and put a check in the box next to, Connect At Power On.
195
-- If you want to configure a secure boot for the Photon OS VM you created, choose the VM Options tab, expand Boot Options, and select EFI from the firmware drop-down.  An EFI boot ensures that the ISO content is signed by VMware and that the entire stack is secure.
196
-
197
-Choose **Next**.
198
-
199
-## Step 6: Verify VM Settings
200
-
201
-The installer displays a summary of your selected settings.
202
-
203
-[[/images/vs-iso-ready.png]]
204
-
205
-Click **Finish**. vSphere creates the VM.
206
-
207
-## Step 7: Power on the VM
208
-
209
-Select the VM and power it on.
210
-
211
-[[/images/vs-iso-install.png]]
212
-
213
-When you see the Photon Installer boot menu, press Enter on your keyboard to start installing.
214
-
215
-## Step 8: Accept the License Agreement
216
-
217
-Read the License Agreement and press the Enter key to accept.
218
-
219
-[[/images/vs-iso-license.png]]
220
-
221
-## Step 9: Configure the Partition
222
-
223
-The installer will detect one disk, which should be the 16GB volume configured as part of the virtual machine creation. Choose **Auto**  to have the installer automatically allocate the partition, or choose **Custom**  if you want to configure individual partitions, and then press the Enter key.
224
-
225
-[[/images/vs-iso-partition.png]]
226
-
227
-**Note:**  If you choose Custom, the installer displays the following screen.
228
-
229
-[[/images/vs-iso-partition-custom.png]]
230
-
231
-For each custom partition, choose **Create New**  and specify the following information:
232
-
233
-[[/images/vs-iso-partition-new.png]]
234
-
235
-**Size** - Preallocated size of this partition, in MB.
236
-
237
-**Type** - One of the following options:
238
-
239
-- **ext3** - ext3 file system
240
-- **ext4** - ext4 file system
241
-- **swap** - swap partition
242
-
243
-**Mountpoint** - Mount point for this partition.
244
-
245
-Choose **OK** and press the Enter key. When you are done defining custom partitions, choose **Next** and press the Enter key.
246
-
247
-The installer prompts you to confirm that you want to erase the entire disk.
248
-
249
-[[/images/vs-iso-erase.png]]
250
-
251
-Choose **Yes** and press the Enter key.
252
-
253
-## Step 10: Select an Installation Option
254
-
255
-After partitioning the disk, the installer will prompt you to select an installation option.
256
-
257
-[[/images/vs-iso-install-option.png]]
258
-
259
-Each install option provides a different run-time environment, depending on your requirements.
260
-
261
-| **Option** | **Description** |
262
-| --- | --- |
263
-| **Photon Minimal** | Photon Minimum is a very lightweight version of the container host runtime that is best suited for container management and hosting. There is sufficient packaging and functionality to allow most common operations around modifying existing containers, as well as being a highly performant and full-featured runtime. |
264
-| **Photon Full** | Photon Full includes several additional packages to enhance the authoring and packaging of containerized applications and/or system customization. For simply running containers, Photon Full will be overkill. Use Photon Full for developing and packaging the application that will be run as a container, as well as authoring the container, itself. For testing and validation purposes, Photon Full will include all components necessary to run containers. |
265
-| **Photon OSTree Server** | This installation profile will create the server instance that will host the filesystem tree and managed definitions for rpm-ostree managed hosts created with the &quot;Photon OSTree Host&quot; installation profile. Most environments should need only one Photon OSTree Server instance to manage the state of the Photon OSTree Hosts. Use Photon OSTree Server when you are establishing a new repository and management node for Photon OS hosts. |
266
-
267
-**Note:**  The option you choose determines the disk and memory resources required for your installation.
268
-
269
-Select the option you want and press the Enter key.
270
-
271
-## Step 11: Select the Linux Kernel
272
-
273
-Select a Linux kernel to install.
274
-
275
-[[/images/vs-iso-kernel.png]]
276
-
277
-- **Hypervisor**  optimized means that any components that are not needed for running under a VMware hypervisor have been removed for faster boot times.
278
-- **Generic**  means that all components are included.
279
-
280
-Choose **Next** and press the Enter key.
281
-
282
-## Step 12: Specify the Hostname
283
-
284
-The installer prompts you for a hostname and suggest a randomly generated, unique hostname that you can change if you want.
285
-
286
-[[/images/vs-iso-hostname.png]]
287
-
288
-Press the Enter key.
289
-
290
-## Step 13: Specify the System root Password
291
-
292
-The installer prompts you to enter the system root password.
293
-
294
-_Note: Photon OS will not permit commonly used dictionary words to be set as a root password._
295
-
296
-[[/images/vs-iso-root-password.png]]
297
-
298
-Type a password and press the Enter key.
299
-
300
-The installer prompts you to confirm your root password by typing it a second time.
301
-
302
-[[/images/vs-iso-root-password-confirm.png]]
303
-
304
-**Note:** If you have trouble with unintentional repeated characters in the Remote Console, follow VMware KB 196 ( [http://kb.vmware.com/kb/196](http://kb.vmware.com/kb/196)) for a setting to apply to the virtual machine.
305
-
306
-Press the Enter key. The installer proceeds to install the software. Installation times will vary based on the system hardware and installation options you selected. Most installations complete in less than one minute.
307
-
308
-## Step 14: Reboot the VM and Log In
309
-
310
-Once finished, the installer displays a confirmation message (which includes how long it took to install Photon OS) and prompts you to press a key on your keyboard to boot the new VM.
311
-
312
-[[/images/vs-iso-installed.png]]
313
-
314
-As the initial boot process begins, the installer displays the Photon splash screen, and then a login prompt.
315
-
316
-[[/images/vs-iso-splash.png]]
317
-
318
-At the login prompt, type **root**  as the username and provide the password chosen during the installation.
319
-
320
-[[/images/vs-iso-login.png]]
321
-
322
-You have now successfully setup Photon OS and are ready to use your container runtime environment. Proceed to the next section to deploy a containerized application.
323
-
324
-# Deploying a Containerized Application in Photon OS
325
-
326
-Now that you have your container runtime environment up and running, you can easily deploy a containerized application. For this example, you will deploy the popular open source Web Server Nginx. The Nginx application has a customized VMware package that is published as a dockerfile and can be downloaded, directly, through the Docker module from the Docker Hub.
327
-
328
-## Step 1: Run Docker
329
-
330
-To run Docker from the command prompt, enter the following command, which initializes the docker engine:
331
-
332
-    systemctl start docker
333
-
334
-To ensure Docker daemon service runs on every subsequent VM reboot, enter the following command:
335
-
336
-    systemctl enable docker
337
-
338
-## Step 2: Run the Nginx Web Server
339
-
340
-Now the Docker daemon service is running, it is a simple task to &quot;pull&quot; and start the Nginx Web Server container from Docker Hub. To do this, type the following command:
341
-
342
-    docker run -d -p 80:80 vmwarecna/nginx
343
-
344
-This pulls the Nginx Web Server files and appropriate dependent container filesystem layers required for this containerized application to run.
345
-
346
-[[/images/vs-docker-run.png]]
347
-
348
-After the **docker run**  process completes, you return to the command prompt. You now have a fully active website up and running in a container!
349
-
350
-## Step 3: Test the Web Server
351
-
352
-To test that your Web Server is active, run the ifconfig command to get the IP address of the Photon OS Virtual Machine.
353
-
354
-[[/images/vs-docker-ifconfig.png]]
355
-
356
-The output displays a list of adapters that are connected to the virtual machine. Typically, the web server daemon will be bound on **eth0**.
357
-
358
-Start a browser on your host machine and enter the IP address of your Photon OS Virtual Machine. You should see a screen similar to the following example as confirmation that your web server is active.
359
-
360
-[[/images/vs-docker-confirm.png]]
361
-
362
-You can now run any other containerized application from Docker Hub or your own containerized application within Photon OS.
363
-
364
-# Installing Photon OS v1.0
365
-
366
-This section provides installation instructions for Photon OS v1.0.
367
-
368
-## Photon OS 1.0 Prerequisites
369
-
370
-In order to install and start using Photon OS with VMware vSphere, the following pre-requisites must be satisfied: 
371
-
372
-* VMware vSphere 5.5 or VMware vSphere 6.0 installed 
373
-* ESXi host with recommended 2GB of free RAM
374
-* ESXi host with recommended 8GB of free disk space
375
-* The Photon OS ISO downloaded from Bintray
376
-
377
-This document uses VMware vSphere 6. VMware recommends that you use the latest version, though vSphere 5.5 or later should work as well. 
378
-
379
-## Importing the Photon OS 1.0 OVA
380
-
381
-Using the OVA is a fast and easy way to create a Photon OS VM. Once you’ve downloaded the OVA, log in to your vSphere environment and, from the `Actions` pull-down menu, select, `Deploy OVF Template …` On the popup window, point vSphere to the OVA file that you’ve downloaded. 
382
-
383
-![vsphere1](https://cloud.githubusercontent.com/assets/11306358/9568101/1fc05610-4f06-11e5-912c-0009be3ef065.jpg)
384
-
385
-Click the `Next` button at the bottom of the window and vSphere will upload and validate your OVA. Depending on bandwidth, this operation might take a while. 
386
-
387
-After validating the image, vSphere will present a summary of the details of the OVA. Click the `Next` button to proceed to selecting a location to store the imported Photon OS instance.
388
-
389
-Click `Finish`
390
-
391
-At this point, you’ve got a Photon OS instance ready to go; but before you power on that Photon OS instance, consider first converting this VM into a template. By converting this imported VM to a template, you have a master Photon OS instance that can be combined with vSphere Guest Customization to enable rapid provisioning of Photon OS instances. 
392
-
393
-The OVA contains a default password of "changeme" for the root account that must be changed upon initial login. For security, Photon OS forbids common dictionary words for the root password.
394
- 
395
-## Installing the Photon OS 1.0 ISO Image
396
-
397
-Once the ISO image has been uploaded to a datastore that is attached to the host on which you’ll create the Photon OS virtual machine, start the installation process by creating a new virtual machine.
398
-When creating a new VM, the first thing you’ll need to specify is the compatibility of that VM with ESXi versions. Select a compatibility level for your VM, as shown below. Photon OS shouldn’t require any particular compatibility, but VMware recommends that you choose the latest available option for your release of vSphere.
399
-
400
-![vsphere2](https://cloud.githubusercontent.com/assets/11306358/9568103/200be058-4f06-11e5-876c-8d3645abb638.jpg)
401
-
402
-When prompted for the `Guest OS Family,` choose `Linux` and, for Guest OS Version, choose `Other 3.x Linux (64-bit)`. 
403
-
404
-![vsphere3](https://cloud.githubusercontent.com/assets/11306358/9568111/21ae2920-4f06-11e5-97e6-3be30cea894b.jpg)
405
-
406
-The recommended virtual hardware settings for your Photon VM are heavily dependent upon the container load you intend to run within Photon OS – more containers or more intensive containers will require you to adjust these settings for your application load. VMware suggests 2 vCPU, 1024MB memory, 20GB hard disk. Any unwanted devices should be removed.  Be sure to mount the Photon OS ISO on the CD/DVD Drive and put a check in the box next to, `Connect At Power On.`
407
-
408
-![vsphere4](https://cloud.githubusercontent.com/assets/11306358/9568107/2089147e-4f06-11e5-9549-908b8ab21a86.jpg)
409
-
410
-To summarize, these are the settings we recommend as a starting point for your Photon OS container runtime host: Thin provisioned, hardware compatibility: ESXi 6.0 and later (VM version 11).
411
-
412
-Power on the Photon OS virtual machine and, within a few seconds, the Photon Installer Boot Menu will appear.  Download and install the Remote Console if you do not have it already; otherwise, click `Launch Remote Console` to interact with the installer.
413
-
414
-![vsphere5](https://cloud.githubusercontent.com/assets/11306358/9568105/20589cd6-4f06-11e5-8b6c-88974382317d.jpg)
415
-
416
-Once connected to the remote console, select `Install` to proceed.
417
-
418
-![vsphere6](https://cloud.githubusercontent.com/assets/11306358/16130444/b781bcac-33ce-11e6-8cbf-2dea3c0e3e40.png)
419
-
420
-After you accept the EULA, the installer will detect one disk, which should be the 20GB volume configured as part of the virtual machine creation. Select the disk and press enter.  When you are prompted to confirm that it is okay to erase the entire disk, select `Yes` to accept and proceed with the installation.
421
-
422
-![vsphere7](https://cloud.githubusercontent.com/assets/11306358/9568104/2043ea16-4f06-11e5-9b8f-48f6037501da.jpg)
423
-
424
-You will now be presented with several installation options:
425
-
426
-![vsphere8](https://cloud.githubusercontent.com/assets/11306358/16130445/b787f3e2-33ce-11e6-874b-ebdf97b568b5.png)
427
-
428
-Each install option provides a different runtime environment:
429
-
430
-* Photon Minimal: Photon Minimum is a very lightweight version of the container host runtime that is best suited for container management and hosting. There is sufficient packaging and functionality to allow most common operations around modifying existing containers, as well as being a highly performant and full-featured runtime. 
431
-
432
-* Photon Full: Photon Full includes several additional packages to enhance the authoring and packaging of containerized applications and system customization. For simply running containers, Photon Full will be overkill. Use Photon Full for developing and packaging the application that will be run as a container, as well as authoring the container itself. For testing and validation purposes, Photon Full will include all components necessary to run containers. 
433
-
434
-* Photon OSTree Host: This installation profile creates a Photon OS instance that will source its packages from a central rpm-ostree server and continue to have the library and state of packages managed by the definition that is maintained on the central rpm-ostree server. Use Photon OStree Hosts when you are interested in experimenting with the concept of a centrally authored and maintained OS version. This concept of treating the OS as a versioned, atomic entity can simplify lifecycle management and security at scale. 
435
-
436
-* Photon OSTree Server: This installation profile will create the server instance that will host the filesystem tree and managed definitions for rpm-ostree managed hosts created with the Photon OSTree Host installation profile. Most environments should need only one Photon OSTree Server instance to manage the state of the Photon OSTree Hosts. Use Photon OSTree Server when you are establishing a new repository and management node for Photon OS hosts.  
437
-
438
-For the purposes of this how-to guide, select the option to install Photon Minimal. Once `Photon Minimal` is highlighted, press the Enter key on your keyboard.
439
-
440
-You will now be prompted for a hostname. Photon OS will prepopulate a randomly generated, unique hostname; you can either use this suggestion or enter your own hostname, as shown in the screenshot below:
441
-
442
-![vsphere9](https://cloud.githubusercontent.com/assets/11306358/9568108/20a8348a-4f06-11e5-9826-fcf992fb6635.jpg)
443
-
444
-After selecting a hostname and pressing Enter, you will be prompted to first type and, then, confirm the system root password. If you have trouble with unintentional repeated characters in the Remote Console, follow VMware KB 196 (http://kb.vmware.com/kb/196) for a setting to apply to the virtual machine.
445
-
446
-*Note: Photon OS will not permit commonly used dictionary words to be set as a root password.*
447
-
448
-After confirming the password, the installation process should begin.
449
-
450
-Installation times will vary based on system hardware and installation options, but most installations complete in less than a minute. Once the installation completes, press any key and the virtual machine will reboot into Photon OS.
451
-
452
-As the initial boot process begins, you will see the Photon splash screen before you are taken to a login prompt.
453
-
454
-At the login prompt, enter `root` as the username and provide the password chosen during the installation. 
455
-
456
-You have now successfully setup Photon OS and are ready to use your container runtime environment.
457
- 
458
-## Installing a Containerized Application in Photon OS 1.0
459
-Now that you have your container runtime environment up and running, you may be wondering, “what can I do now?” A command prompt is not the most exciting thing. To help demonstrate the ease with which you can deploy a containerized application, this section showcases how you can quickly get a web server up and running.
460
-
461
-For this example, we will use the popular open source web server Nginx. The Nginx application has a customized VMware package  published as a dockerfile that can be downloaded directly in Docker from the Docker Hub.
462
-
463
-To run Docker from the command prompt, enter the command below to initialize the docker engine:
464
-
465
-`systemctl start docker`
466
-
467
-To ensure the docker daemon service runs on every subsequent VM reboot, enter:
468
-
469
-`systemctl enable docker`
470
-
471
-Now that the docker daemon service is running, it is a simple task to pull and start the Nginx Web Server container from Docker Hub.  To do this, enter the following command:
472
-
473
-`docker run -d -p 80:80 vmwarecna/nginx`
474
-
475
-This will then pull the Nginx Web Server files and appropriate dependent containers to ensure this containerized application can run.  You will see a screenshot similar to below, as the container and dependencies are downloaded and the container is prepared to run: 
476
-
477
-![vsphere12](https://cloud.githubusercontent.com/assets/11306358/9568112/21aeeedc-4f06-11e5-9feb-280e4a8f2d5b.jpg)
478
-
479
-Once the `docker run` process is completed, you will be returned to the command prompt.  You now have a fully active web server up and running through typing just a single command within Photon OS using containers.
480
-
481
-To test that your web server is active, we need to get the IP address of the Photon OS Virtual Machine. To get the IP address, enter the following command: 
482
-
483
-	ifconfig
484
-
485
-This will now display a list of adapters connected to the virtual machine.  Typically, the web server daemon will be bound to `eth0.`  
486
-
487
-Start a browser on your host machine and enter the IP address of your Photon OS Virtual Machine.  The following screen will appear showing that your web server is active:
488
-
489
-![vsphere13](https://cloud.githubusercontent.com/assets/11306358/9568113/21b1990c-4f06-11e5-9136-afe1e45bd105.jpg)
490
-
491
-You can now run any other containerized application from Docker Hub or your own containerized application within Photon OS.
492
-
493
-If you are having trouble viewing the screen that shows the web server is active, you might have to add an iptables rule to your container VM to allow traffic on Port 80:
494
-
495
-`iptables -I INPUT 1 -p tcp --dport 80 -j ACCEPT`
496
-
497
-In addition, you might have to modify /etc/httpd/httpd.conf to listen on Port 80 by adding the following line:  
498
-
499
-`Listen 0.0.0.0:80`
500
-
501
-**We hope you enjoy using Photon OS as much as we enjoy creating it.**
502 1
deleted file mode 100644
... ...
@@ -1,514 +0,0 @@
1
-This guide describes how to get started using Photon OS as a virtual machine within VMware Fusion. It provides instructions for downloading Photon OS (as an OVA or ISO file), describes the various installation options, and walks through the steps of installing the Photon OS distribution on Fusion. Once Photon OS is installed, this document shows how to deploy a containerized application in Docker with a single command.
2
-
3
-- [About Photon OS](#about-photon-os)
4
-- [Requirements](#requirements)
5
-- [Deciding Whether to Use an OVA or ISO](#deciding-whether-to-use-an-ova-or-iso)
6
-- [Downloading Photon OS](#downloading-photon-os)
7
-- [Importing the OVA for Photon OS 2.0](#importing-the-ova-for-photon-os-20)
8
-- [Installing the ISO Image for Photon OS 2.0](#installing-the-iso-image-for-photon-os-20)
9
-- [Deploying a Containerized Application in Photon OS](#deploying-a-containerized-application-in-photon-os)
10
-- [Installing Photon OS 1.0](#installing-photon-os-10)
11
-
12
-**Note**: If you want to upgrade an existing Photon 1.0 VM, refer to the instructions in [Upgrading to Photon OS 2.0](https://github.com/vmware/photon/wiki/Upgrading-to-Photon-OS-2.0). 
13
-
14
-# About Photon OS
15
-
16
-Photon OS™ is an open source Linux container host optimized for cloud-native applications, cloud platforms, and VMware infrastructure. Photon OS provides a secure run-time environment for efficiently running containers. For an overview, see [https://vmware.github.io/photon/](https://vmware.github.io/photon/).
17
-
18
-# Requirements
19
-
20
-Using Photon OS within VMware Fusion requires the following resources:
21
-
22
-| **Resource** | **Description** |
23
-| --- | --- |
24
-| VMware Fusion | VMware Fusion (v7.0 or higher) must be installed. The latest version is recommended. |
25
-| Memory | 2GB of free RAM (recommended) |
26
-| Storage | **Minimal Photon install** : 512MB of free space (minimum); **Full Photon install** : 4GB of free space (minimum); 8GB recommended. |
27
-| Distribution File | Photon OS ISO or OVA file downloaded from bintray ( [https://bintray.com/vmware/photon/](https://bintray.com/vmware/photon/)). |
28
-
29
-Resource requirements and recommendations vary depending on several factors, including the host environment (for example, VMware Fusion and VMware vSphere), the distribution file used (ISO or OVA), and the selected installation settings (for example, full or basic installation).
30
-
31
-**Note:** The setup instructions in this guide use VMware Fusion Professional version 8.5.8, as per the following screenshot.
32
-
33
-[[/images/fs-version.png]]
34
-
35
-# Deciding Whether to Use an OVA or ISO
36
-
37
-The first step is decide whether to use the OVA or ISO distribution to set up Photon OS.
38
-
39
-- **OVA import**: Because of the nature of an OVA, you&#39;re getting a pre-installed version of Photon OS. Choose the OVA with Hardware Version 11 (_not_ 13). The OVA benefits from a simple import process and some kernel tuning for VMware environments. However, because it&#39;s a pre-installed version, the set of packages that are installed are predetermined. Any additional packages that you need can be installed using **tdnf**.
40
-- **ISO install**: The ISO, on the other hand, allows for a more complete installation or automated installation via kickstart.
41
-
42
-If you&#39;re just looking for the fastest way to get up and running, start with the OVA.
43
-
44
-# Downloading Photon OS
45
-
46
-Once you&#39;ve decided which way to install, you&#39;ll need to download the correct binaries. Go to the following Bintray URL and download the latest release of Photon OS:
47
-
48
-[https://bintray.com/vmware/photon/](https://bintray.com/vmware/photon/)
49
-
50
-For instructions, see  [Downloading Photon OS](https://github.com/vmware/photon/wiki/Downloading-Photon-OS).
51
-
52
-# Importing the OVA for Photon OS 2.0
53
-
54
-Importing the OVA image is the easiest way to create a Photon OS VM.
55
-
56
-## Step 1: Start the Import Process
57
-
58
-After you have downloaded the latest Photon OS OVA image (OVA with Hardware Version 11) into a folder of your choice, open VMware Fusion. From the File menu, choose **Import …**. Fusion prompts you to choose an existing virtual machine.
59
-
60
-[[/images/fs-ova-import.png]]
61
-
62
-Choose the **Choose File …**  button to locate and select the Photon OS OVA, then choose **Contionue**.
63
-
64
-[[/images/fs-ova-selected.png]]
65
-
66
-## Step 2: Specify the Name and Storage Location
67
-
68
-Provide the name and storage location for your Photon OS VM, then choose **Save**.
69
-
70
-[[/images/fs-ova-name.png]]
71
-
72
-Review the Photon OS License Agreement, then choose **Accept** to start the import process.
73
-
74
-[[/images/fs-ova-license.png]]
75
-
76
-## Step 3: Configure VM Settings
77
-
78
-After the OVA is imported, Fusion displays a confirmation that the import has completed and a summary of the settings for your Photon OS VM. The following screen shot is an example (your settings may vary).
79
-
80
-[[/images/fs-ova-finish.png]]
81
-
82
-**Important:** Choose **Customize Settings**  to change the operating system (as recognized by the hypervisor) for the newly imported VM.
83
-
84
-[[/images/fs-ova-settings.png]]
85
-
86
-Choose **General**.
87
-
88
-Click the selection box next to **OS**, select **Linux** , and then select **VMware Photon 64-bit**.
89
-
90
-[[/images/fs-ova-os.png]]
91
-
92
-Close the settings window. Fusion prompts you to verify that you want to change the operating system.
93
-
94
-[[/images/fs-ova-os-confirm.png]]
95
-
96
-Click **Change**. Your Photon OS VM is ready to power on.
97
-
98
-## Step 4: Power on the VM
99
-
100
-Power on the Photon OS VM. Fusion may ask you whether you want to upgrade this VM.
101
-
102
-[[/images/fs-ova-upgrade.png]]
103
-
104
-How you respond depends on which hardware version (13 or 11) that you want to use. Upgrade if you need to use devices supported only in hardware version 13. Don&#39;t upgrade if you want to be compatible with older tools that are supported in hardware version 11.
105
-
106
-## Step 5: Update Login Credentials
107
-
108
-[[/images/fs-ova-splash.png]]
109
-
110
-After the VM is booted, Fusion prompts you to log in.
111
-
112
-**Note** : Because of limitations within OVA support on Fusion, it was necessary to specify a default password for the OVA option. However, all Photon OS instances that are created by importing the OVA will require an immediate password change upon login. The default account credentials are:
113
-
114
-| **Setting** | **Value** |
115
-| --- | --- |
116
-| Username | ``root`` |
117
-| Password | ``changeme`` |
118
-
119
-After you provide these credentials, Fusion prompts you to create a new password and type it a second time to verify it. For security, Photon OS forbids common dictionary words for the root password. Once logged in, you will see the shell prompt.
120
-
121
-[[/images/fs-ova-login.png]]
122
-
123
-Once complete, proceed to [Deploying a Containerized Application in Photon OS](#deploying-a-containerized-application-in-photon-os).
124
-
125
-# Installing the ISO Image for Photon OS 2.0
126
-
127
-After you have downloaded the latest Photon OS ISO image into a folder of your choice, open VMware Fusion.
128
-
129
-## Step 1: Start the Installation Process
130
-
131
-From the File menu, choose  **New**.
132
-
133
-[[/images/fs-iso-new.png]]
134
-
135
-From the Select the Installation Method dialog, select **Install from disc or image**, and then choose **Continue**.
136
-
137
-[[/images/fs-iso-new-prompt.png]]
138
-
139
-## Step 2: Select the ISO Image
140
-
141
-Drag a disc image onto the window or choose **Use another disc or disc image...**, choose the ISO file you want, and then choose **Continue**.
142
-
143
-[[/images/fs-iso-new-selected.png]]
144
-
145
-## Step 3: Select the Operating System
146
-
147
-On the Choose Operating System dialog, select **Linux**  in the left-hand column and **VMware Photon 64-bit**  in the right-hand column.
148
-
149
-[[/images/fs-iso-os.png]]
150
-
151
-Choose **Continue**.
152
-
153
-## Step 4: Select the Virtual Disk (Optional)
154
-
155
-If you are using a Fusion version that is older than Fusion 8, you might see the following dialog.
156
-
157
-[[/images/fs-iso-virtual-disk.png]]
158
-
159
-If you see this dialog, unless you&#39;re installing into an existing machine, choose **Create a new virtual disk**  from the Choose a Virtual Disk dialog, and then choose **Continue**.
160
-
161
-**Note:** Fusion v8 and later automatically defaults to creating a new 8GB disk and formats it automatically. If you want to use an existing disk, or if you want to pre-allocate all 8GB, go into VM Settings, choose **Add Device**, and choose either **New Hard Disk** or **Existing Hard Disk**. Expand **Advanced options**  and configure whether you want to pre-allocate disk space (disabled by default) or split into multiple files (enabled by default).
162
-
163
-## Step 5: Configure VM Settings
164
-
165
-**Important:** Before you finish creating the Photon OS Virtual Machine, we strongly recommend that you customize the virtual machine and remove any unwanted devices that are not needed for a container run-time environment.
166
-
167
-[[/images/fs-iso-finish.png]]
168
-
169
-To remove unnecessary devices, choose **Customize Settings**.
170
-
171
-First, choose a name for your Virtual Machine, along with the folder into which you create the Virtual Machine (or accept the default folder).
172
-
173
-[[/images/fs-iso-name.png]]
174
-
175
-Choose **Save**. The virtual machine will be created. The Settings screen allows you to customize virtual hardware for the new virtual machine. If it does not automatically appear, open **Settings** from the Virtual Machine menu bar.
176
-
177
-[[/images/fs-iso-settings.png]]
178
-
179
-You can remove (recommended) the following components that are not used by Photon OS:
180
-
181
-- Select **Display** and ensure that the **Accelerate 3D Graphics** option is unchecked (it should be unchecked, by default). Select **Show All** to return to the VM Settings.
182
-- Select **CD/DVD (IDE)** and ensure that the **Connect CD/DVD Drive** box is checked (it should be checked by default). Select **Show All** to return to the VM Settings.
183
-- Select **Sound Card**, un-check the **Connect Sound Card** Option, and click **Remove Sound Card.** Choose **Remove** to confirm your action. Select **Show All** to return to the VM Settings.
184
-- Select **USB &amp; Bluetooth** and uncheck the **Share Bluetooth devices with Linux** setting. Select **Show All** to return to the VM Settings.
185
-- Select **Printer** and press the **Remove Printer Port** button in the bottom left hand corner. Choose **Remove** to confirm your action. Select **Show All** to return to the VM Settings.
186
-- Select **Camera** and press the **Remove Camera** button in the bottom left hand corner. Choose **Remove** to confirm your action. Select **Show All** to return to the VM Settings.
187
-- Select **Advanced** and ensure that the **Pass Power Status to VM** option is unchecked (it should be unchecked, by default). Select **Show All,** but do not close the VM Settings window.
188
-
189
-By default, Photon OS is configured with a disk size of 8GB. However, Photon OS uses only the portion of disk space it needs, usually much less that the entire disk size. If you want to pre-allocate the entire disk size (reserving it entirely for Photon OS instead), select **Hard Disk**, expand **Advanced options**, and check **Pre-allocate disk space** (by default, it is unchecked). Select **Show All** to return to the VM Settings.
190
-
191
-## Step 6: Configure a Secure Boot (Optional)
192
-
193
-**Note:**  If you want to configure a secure boot for the Photon OS VM you created, edit its .vmx file  and add the following line:
194
-
195
-**firmware = &quot;efi&quot;**
196
-
197
-The EFI boot ensures that the ISO content is signed by VMware and that the entire stack is secure.
198
-
199
-After you have made the customizations you want, close the Virtual Machine Settings window. You are now ready to boot and begin the installation process.
200
-
201
-## Step 7: Power On the VM
202
-
203
-Return to the Fusion main menu, select the Photon OS Virtual Machine, and click **Start Up** (you can also choose **Start Up** from the Virtual Machine menu).
204
-
205
-Fusion powers on the host and starts the installation. Within a few seconds, Fusion displays the Photon OS installer boot menu.
206
-
207
-[[/images/fs-iso-install.png]]
208
-
209
-Press the Enter key on your keyboard to start installing.
210
-
211
-[[/images/fs-iso-license.png]]
212
-
213
-Read the License Agreement and press the Enter key to accept.
214
-
215
-## Step 8: Configure the Partition
216
-
217
-The Installer will detect one disk, which should be the 8GB volume configured as part of the virtual machine creation.
218
-
219
-[[/images/fs-iso-partition.png]]
220
-
221
-Choose **Auto**  to have the installer automatically allocate the partition, or choose **Custom** if you want to configure individual partitions, and then press the Enter key.
222
-
223
-**Note:** If you choose **Custom**, the installer displays the following screen.
224
-
225
-[[/images/fs-iso-partition-custom.png]]
226
-
227
-For each custom partition, choose **Create New**  and specify the following information:
228
-
229
-[[/images/fs-iso-partition-new.png]]
230
-
231
-**Size** - Preallocated size of this partition, in MB.
232
-
233
-**Type** - One of the following options:
234
-
235
-- **ext3** - ext3 file system
236
-- **ext4** - ext4 file system
237
-- **swap** - swap partition
238
-
239
-**Mountpoint** - Mount point for this partition.
240
-
241
-Choose **OK** and press the Enter key. When you are done defining custom partitions, choose **Next**  and press the Enter key.
242
-
243
-The installer prompts you to confirm that you want to erase the entire disk.
244
-
245
-[[/images/fs-iso-disk-erase.png]]
246
-
247
-Choose **Yes** and press the Enter key to accept and proceed with the installation.
248
-
249
-## Step 9: Select an Installation Option
250
-
251
-After partitioning, the installer prompts you to select one of three installation options:
252
-
253
-[[/images/fs-iso-install-option.png]]
254
-
255
-Each install option provides a different run-time environment. Select the option that best meets your requirements.
256
-
257
-| **Option** | **Description** |
258
-| --- | --- |
259
-| **Photon Minimal** | Photon Minimum is a very lightweight version of the container host runtime that is best suited for container management and hosting. There is sufficient packaging and functionality to allow most common operations around modifying existing containers, as well as being a highly performant and full-featured runtime. |
260
-| **Photon Full** | Photon Full includes several additional packages to enhance the authoring and packaging of containerized applications and/or system customization. For simply running containers, Photon Full will be overkill. Use Photon Full for developing and packaging the application that will be run as a container, as well as authoring the container, itself. For testing and validation purposes, Photon Full will include all components necessary to run containers. |
261
-| **Photon OSTree Server** | This installation profile will create the server instance that will host the filesystem tree and managed definitions for rpm-ostree managed hosts created with the &quot;Photon OSTree Host&quot; installation profile. Most environments should need only one Photon OSTree Server instance to manage the state of the Photon OSTree Hosts. Use Photon OSTree Server when you are establishing a new repository and management node for Photon OS hosts. |
262
-
263
-**Note:** The option you choose determines the disk and memory resources required for your installation.
264
-
265
-Select the option you want and press the Enter key.
266
-
267
-## Step 10: Select the Linux Kernel
268
-
269
-The installer prompts you to select the Linux kernel to install:
270
-
271
-[[/images/fs-iso-kernel.png]]
272
-
273
-- **Hypervisor optimized** means that any components that are not needed for running under a VMware hypervisor have been removed for faster boot times.
274
-- **Generic** means that all components are included.
275
-
276
-## Step 11: Specify the Hostname
277
-
278
-The installer prompts you for a hostname and suggest a randomly generated, unique hostname that you can change if you want.
279
-
280
-[[/images/fs-iso-hostname.png]]
281
-
282
-Press the Enter key.
283
-
284
-## Step 12: Specify the System root Password
285
-
286
-_Note: Photon OS will not permit commonly used dictionary words to be set as a root password._
287
-
288
-The installer prompts you to enter the system root password. Type the password, and then press the Enter key.
289
-
290
-[[/images/fs-iso-root-password.png]]
291
-
292
-Confirm the root password by typing it a second time.
293
-
294
-[[/images/fs-iso-root-password-confirm.png]]
295
-
296
-Press the Enter key. The installer proceeds to install the software. Installation times will vary based on the system hardware and installation options you selected. Most installations complete in less than one minute.
297
-
298
-Once finished, the installer displays a confirmation message (which includes how long it took to install Photon OS) and prompts you to press a key on your keyboard to boot the new VM.
299
-
300
-[[/images/fs-iso-installed.png]]
301
-
302
-## Step 13: Reboot the VM and Log In
303
-
304
-Press any key on the keyboard and the virtual machine will reboot into Photon OS.
305
-
306
-[[/images/fs-iso-splash.png]]
307
-
308
-As the initial boot process begins, the installer displays the Photon splash screen, and then a login prompt.
309
-
310
-At the login prompt, enter **root**  as the username and provide the password chosen during the installation.
311
-
312
-[[/images/fs-iso-login.png]]
313
-
314
-You have now successfully setup Photon OS and are ready to use your container run-time environment. Proceed to the next section to deploy a containerized application.
315
-
316
-# Deploying a Containerized Application in Photon OS
317
-
318
-Now that you have your container runtime environment up and running, you can easily deploy a containerized application. For this example, you will deploy the popular open source Web Server Nginx. The Nginx application has a customized VMware package that is published as a dockerfile and can be downloaded, directly, through the Docker module from the Docker Hub.
319
-
320
-## Step 1: Run Docker
321
-
322
-To run Docker from the command prompt, enter the following command, which initializes the docker engine:
323
-
324
-    systemctl start docker
325
-
326
-To ensure Docker daemon service runs on every subsequent VM reboot, enter the following command:
327
-
328
-    systemctl enable docker
329
-
330
-## Step 2: Run the Nginx Web Server
331
-
332
-Now the Docker daemon service is running, it is a simple task to &quot;pull&quot; and start the Nginx Web Server container from Docker Hub. To do this, type the following command:
333
-
334
-    docker run -d -p 80:80 vmwarecna/nginx
335
-
336
-This pulls the Nginx Web Server files and appropriate dependent container filesystem layers required for this containerized application to run.
337
-
338
-[[/images/fs-docker-run.png]]
339
-
340
-After the **docker run** process completes, you return to the command prompt. You now have a fully active website up and running in a container.
341
-
342
-## Step 3: Test the Web Server
343
-
344
-To test that your Web Server is active, run the ifconfig command to get the IP address of the Photon OS Virtual Machine.
345
-
346
-[[/images/fs-docker-ifconfig.png]]
347
-
348
-The output displays a list of adapters that are connected to the virtual machine. Typically, the web server daemon will be bound on &quot;eth0.&quot;
349
-
350
-Start a browser on your host machine and enter the IP address of your Photon OS Virtual Machine. You should see a screen similar to the following example as confirmation that your web server is active.
351
-
352
-[[/images/fs-docker-confirm.png]]
353
-
354
-You can now run any other containerized application from Docker Hub or your own containerized application within Photon OS.
355
-
356
-# Installing Photon OS 1.0
357
-
358
-This section provides setup instructions for Photon OS 1.0.
359
-
360
-## Photon OS 1.0 Prerequisites
361
-In order to install and start using Photon OS with VMware Fusion the following pre-requisites must be satisfied:
362
-* VMware Fusion or VMware Workstation must be installed
363
-* Recommended 2GB of free RAM
364
-* Recommended at least 300MB of free disk space
365
-* Photon OS ISO or OVA
366
-
367
-## Importing the Photon OS 1.0 OVA 
368
-
369
-Using the OVA is the easiest way to create a Photon OS VM. Once you’ve downloaded the OVA, open VMware Fusion and select, “Import …” from the File menu. This will open the “Choose an Existing Virtual Machine” wizard. Use the “Choose File …” button to locate and select the Photon OS OVA.
370
-Note: The “Import” operation is specific to Fusion. For Workstation users, simply double-clicking on the OVA will start the import. 
371
-
372
-![](https://cloud.githubusercontent.com/assets/11306358/16094763/4ac80e12-3307-11e6-8e7b-10ea353ddbfc.png)
373
-
374
-Click “Continue” and provide the name and storage location for your Photon OS VM. Then, click "Save."
375
-
376
-![](https://cloud.githubusercontent.com/assets/11306358/16094759/4ac50000-3307-11e6-8a34-538f36b95f64.png)
377
-
378
-Clicking “Save” will immediately present the Photon OS EULA. In order to start the import process, you'll need to click "Accept" to accept the EULA. 
379
-
380
-![](https://cloud.githubusercontent.com/assets/11306358/16094758/4ac50668-3307-11e6-86ce-943afa12946f.png)
381
-
382
-Once the import is complete, you should get confirmation that the import was Finished and a summary of the settings for your Photon OS VM. Click “Customize Settings” to change the operating system, as recognized by the hypervisor. Within the "General" System Settings for the newly imported VM, click the selection box next to "OS" and select, "VMware Photon 64-bit," as shown below.
383
-
384
-![](https://cloud.githubusercontent.com/assets/11306358/16095187/24abc4f6-3309-11e6-9faa-c4e7b15ba63a.png) 
385
-
386
-Close the settings window and your Photon OS VM is ready to power on.
387
-
388
-![](https://cloud.githubusercontent.com/assets/11306358/16094764/4acf69dc-3307-11e6-9d62-7dd37546a233.png)
389
-
390
-Clicking “Finish” will immediately power on your Photon OS VM. Once the VM is booted, you will be presented with a login prompt. Because of limitations within OVA support on Fusion and Workstation, it was necessary to specify a default password for the OVA option. However, all Photon OS instances that are created by importing the OVA will require an immediate password change upon login. The default account credentials are:
391
-
392
-`Username: root`
393
-`Password: changeme`
394
-
395
-As soon as you enter these credentials, you will be forced to create a new password by entering the new password twice before you can access the shell prompt.
396
-
397
-![](https://cloud.githubusercontent.com/assets/11306358/16094765/4ad06ce2-3307-11e6-827f-e61107185f42.png)
398
- 
399
-## Installing Photon OS 1.0 on VMware Fusion from an ISO Image	
400
-With the latest Photon OS ISO image downloaded into a folder of your choice, Open VMware Fusion and Select “File->New.” The following screen will appear: 
401
-
402
-![](https://cloud.githubusercontent.com/assets/11306358/14651747/df593c52-0636-11e6-9cbe-bfd0db9bfa89.png)
403
-
404
-Select "Create a custom virtual machine" from the "Select the Installation Method" dialog, then, click continue. On the "Choose Operating System" dialog, select, "Linux" in the left-hand column and "VMware Photon 64-bit" in the right-hand column. 
405
-
406
-![fusion7](https://cloud.githubusercontent.com/assets/11306358/14651749/df6fbd74-0636-11e6-8070-a584bddf39f5.png)
407
-
408
-Unless you're installing into an existing machine, select, "Create a new virtual disk" from the "Choose a Virtual Disk dialog, then click "Continue."
409
-
410
-![fusion7b](https://cloud.githubusercontent.com/assets/11306358/14651751/df7428a0-0636-11e6-85b2-64e2dff9be84.png)
411
-
412
-You're almost finished; but, before finishing the Photon OS Virtual Machine Creation, we strongly recommend that you customize the virtual machine and remove any unwanted devices that are not needed for a container runtime environment.  
413
-
414
-![fusion9](https://cloud.githubusercontent.com/assets/11306358/14651750/df7385f8-0636-11e6-9310-0d7f375dd7b5.png) 
415
-
416
-To remove unnecessary devices, from the screen shown below, select “Customize Settings."
417
-
418
-First, choose a name for your Virtual Machine and the folder into which you would like to create the Virtual Machine.  If the default folder of “Virtual Machines” is acceptable, click “Save”.  
419
-
420
-![](https://cloud.githubusercontent.com/assets/11306358/16105478/724ea650-3350-11e6-8e69-272f6a1f6097.png)
421
-
422
-The virtual machine will be created and a new screen will appear, as shown below, that will allow virtual hardware customization to the new virtual machine. If it does not automatically appear, open "Settings" from the Virtual Machine menu bar. 
423
-
424
-![fusion11](https://cloud.githubusercontent.com/assets/11306358/14653053/cd434ffc-063c-11e6-9861-924489b26d75.png)
425
-
426
-It is our recommendation that the following components are removed, since they’re not used by Photon OS:
427
-* Select “Sound Card” and un-tick the “Connect Sound Card” Option and click "Remove Sound Card." Confirm your action and return to the VM Settings by clicking “Show All.”
428
-* Select “Camera” and press the “Remove Camera” button in the bottom left hand corner, confirm your action and then select “Show All” to return to the VM Settings.
429
-* Select “Printer” and press the “Remove Printer Port” button in the bottom left hand corner, confirm your action and then select “Show All” to return to the VM Settings.
430
-* Select “USB & Bluetooth” and uncheck the “Share Bluetooth devices with Linux” setting and then select “Show All”
431
-* Select “Display” and ensure that the “Accelerate 3D Graphics” option is unchecked (it should be unchecked, by default) and, then, return to the VM Settings by selecting “Show All.”
432
-* Select “Advanced” and ensure that the “Pass Power Status to VM” option is unchecked. Select “Show All," but do not close the VM Settings window.
433
-
434
-At this stage we have now made all the necessary customizations and we are ready to select the Photon OS ISO image to boot and begin the installation process. 
435
-
436
-From the Virtual Machine Settings menu in Fusion, select "CD/DVD (IDE)" and, as shown below, point to the downloaded Photon OS ISO and ensure that there is a check in the "Connect CD/DVD Drive" box.
437
-
438
-![](https://cloud.githubusercontent.com/assets/11306358/16105475/72391e0c-3350-11e6-94a2-64587a06e838.png)
439
-
440
-Return to the Fusion main menu, select the Photon OS Virtual Machine and press the “Play” button to power on the host and start the installation.
441
-Within a few seconds the Photon OS Installer Boot Menu will appear.
442
-
443
-![](https://cloud.githubusercontent.com/assets/11306358/16105477/724e902a-3350-11e6-8482-7544d2a6c3fb.png)
444
-
445
-Select – “Install” to proceed. 
446
-
447
-![](https://cloud.githubusercontent.com/assets/11306358/16105480/7251abca-3350-11e6-8f8e-d26244fd75ff.png)
448
-
449
-After you accept the EULA, the Installer will detect one disk, which should be the 8GB volume configured as part of the virtual machine creation. Select the disk and press enter.  You will be prompted to confirm it is okay to erase the entire disk, select “Yes” to accept and proceed with the installation.
450
-You will now be presented with four installation options:
451
-
452
-![fusion15](https://cloud.githubusercontent.com/assets/11306358/14651982/d464f31c-0637-11e6-938d-5d6132ccd63f.png)
453
-
454
-Each install option provides a different runtime environment, depending on your requirements:
455
-
456
-* Photon Minimal: Photon Minimum is a very lightweight version of the container host runtime that is best suited for container management and hosting. There is sufficient packaging and functionality to allow most common operations around modifying existing containers, as well as being a highly performant and full-featured runtime. 
457
-
458
-* Photon Full: Photon Full includes several additional packages to enhance the authoring and packaging of containerized applications and/or system customization. For simply running containers, Photon Full will be overkill. Use Photon Full for developing and packaging the application that will be run as a container, as well as authoring the container, itself. For testing and validation purposes, Photon Full will include all components necessary to run containers. 
459
-
460
-* Photon OSTree Host: This installation profile creates a Photon OS instance that will source its packages from a central rpm-ostree server and continue to have the library and state of packages managed by the definition that is maintained on the central rpm-ostree server. Use Photon OStree Hosts when you are interested in experimenting with the concept of a centrally authored and maintained OS version. This concept of treating the OS as a versioned, atomic entity can simplify lifecycle and security management at scale. 
461
-
462
-* Photon OSTree Server: This installation profile will create the server instance that will host the filesystem tree and managed definitions for rpm-ostree managed hosts created with the “Photon OSTree Host” installation profile. Most environments should need only one Photon OSTree Server instance to manage the state of the Photon OSTree Hosts. Use Photon OSTree Server when you are establishing a new repository and management node for Photon OS hosts.  
463
-
464
-For the purposes of this how-to guide, select option 1, “Photon Minimal.”  Once this selection is highlighted, press the Enter key on your keyboard.
465
-
466
-You will now be prompted for a hostname. Photon OS will prepopulate a randomly generated, unique hostname; you can either use this suggestion or enter your own hostname. After selecting a hostname and pressing “Enter,” you will be prompted to first enter and, then, confirm the system root password.
467
-
468
-*Note: Photon OS will not permit commonly used dictionary words to be set as a root password.*
469
-
470
-After confirming the password, the installation process should begin.
471
-Installation times will vary based on system hardware and installation options, but most installations complete in less than one minute. Once the install is complete you will get a confirmation prompt on the screen stating “Congratulations, Photon has been installed in xx secs, Press any key to continue to boot…”  - Press any key and the virtual machine will reboot into Photon OS.
472
-
473
-![](https://cloud.githubusercontent.com/assets/11306358/16105476/724e70c2-3350-11e6-84af-0c487266108d.png)
474
-
475
-As the initial boot process begins, you will see the Photon splash screen before you are taken to a login prompt.
476
-
477
-![](https://cloud.githubusercontent.com/assets/11306358/16094764/4acf69dc-3307-11e6-9d62-7dd37546a233.png)
478
-
479
-At the login prompt, enter “root” as the username and provide the password chosen during the installation. 
480
-
481
-You have now successfully setup Photon OS and are ready to use your container runtime environment.
482
-
483
-## Installing a Containerized Application on Photon OS 1.0
484
-
485
-Now that you have your container runtime environment up and running, you may be wondering, “what can I do now?” A command prompt is not the most exciting!  To help to demonstrate the ease in which you can deploy a containerized application, we will showcase how you can quickly get a Web Server up and running.
486
-For this example, we will use the popular open source Web Server Nginx. The Nginx application has a customized VMware package and published as a dockerfile and can be downloaded, directly, through the Docker module from the Docker Hub.
487
-
488
-To run Docker from the command prompt, enter the command below to initialize the docker engine:
489
-
490
-`systemctl start docker`
491
-
492
-To ensure Docker daemon service runs on every subsequent VM reboot, enter:
493
-
494
-`systemctl enable docker`
495
-
496
-Now the Docker daemon service is running, it is a simple task to “pull” and start the Nginx Web Server container from Docker Hub.  To do this, type the following command:
497
-
498
-`docker run -d -p 80:80 vmwarecna/nginx`
499
-
500
-This will then pull the Nginx Web Server files and appropriate dependent container filesystem layers to ensure this containerized application can run.  You will see a screenshot similar to below, as the container and dependencies are downloaded and the container is prepared to run:
501
-
502
-![fusion19](https://cloud.githubusercontent.com/assets/11306358/9568066/b3950dd8-4f04-11e5-9333-ac0551a22ace.jpg)
503
-
504
-Once “docker run” process is completed, you will be returned to the command prompt.  You now have a fully active website up and running in a container!
505
-
506
-To test that your Web Server is active, we need to get the IP address of the Photon OS Virtual Machine. To get the IP address, enter the following command ifconfig. This will now display a list of adapters connected to the virtual machine.  Typically, the web server daemon will be bound on “eth0.”  
507
- 
508
-Start a browser on your host machine and enter the IP address of your Photon OS Virtual Machine.  The following screen will appear and that will show that your web server is active: -
509
-
510
-![fusion20](https://cloud.githubusercontent.com/assets/11306358/9568067/b3b6e278-4f04-11e5-93f6-de8383530518.jpg)
511
-
512
-You can now run any other containerized application from Docker Hub or your own containerized application within Photon OS.
513
-
514
-**We hope you enjoy using Photon OS as much as we enjoy creating it!**
515 1
\ No newline at end of file
516 2
deleted file mode 100644
... ...
@@ -1,66 +0,0 @@
1
-Most of the contents are generally applicable, but some items have changed slightly. We're working through the catalog of changes. If you see something that's terribly out of sorts or incorrect, kindly either make the edit or raise an issue. Thanks - the Photon OS Team
2
-
3
-# What is Photon OS?
4
-Photon OS is a tech preview of an open source, Linux container host runtime optimized for vSphere. Photon OS is extensible, lightweight, and supports the most common container formats including Docker, Rocket (rkt) and Garden.
5
-Photon OS includes a small footprint, yum-compatible, package-based lifecycle management system – called “tdnf”- and, alternatively, supports an rpm-ostree image-based system versioning.
6
-
7
-When used with development tools and environments such as VMware Fusion, VMware Workstation, HashiCorp (Vagrant and Atlas) and production runtime environment (vSphere, vCloud Air), Photon OS allows seamless migration of container based apps from development to production.  
8
-
9
-# Introduction
10
-This document explains how to get started using Photon OS as a runtime environment for Linux containers by running Photon OS as a VM instance on vCloud Air.  This guide will provide instructions on deploying Photon OS from the vCloud Air public catalog. 
11
-
12
-Once Photon OS is installed, this guide will also provide instructions on how to demonstrate how simple it can be to deploy a containerized application with Docker and will highlight the installation of a web server simply by running one command!
13
-
14
-# Photon OS on vCloud Air Prerequisites
15
-The following items are required for preparing and launching Photon OS on Google Compute Engine:
16
-
17
-* An account on vCloud Air
18
-
19
-With the TP2 release, Photon OS is published in the vCloud Air catalog. Therefore, it is no longer to download a Photon OS image before getting started. 
20
-
21
-# Creating a Photon OS Instance
22
-Begin by logging into your vCloud Air account and selecting the Service into which you'd like to deploy your Photon OS instance. In this example, we'll use the Virtual Private Cloud OnDemand Service. 
23
-
24
-![](https://cloud.githubusercontent.com/assets/11306358/9573923/4fdf11f4-4f76-11e5-9706-ed10437dad4d.png)
25
- 
26
-Once you've selected the Service for your instance, you'll need to specify the Location for your virtual datacenter from the list of vCloud Air locations. Clicking "Continue" will start the process of creating your virtual datacenter, an associated gateway and a routed network. 
27
-
28
-After vCloud Air is finished creating your virtual datacenter, you're ready to click the "Create your first virtual machine" button to create your Photon OS instance. 
29
-
30
-![](https://cloud.githubusercontent.com/assets/11306358/9573922/4fcfa37c-4f76-11e5-9e6c-f96cdf9a9b91.png)
31
- 
32
-When you click the "Create your first virtual machine" button, you'll be presented the list of templates available in vCloud Air. Select the "64 Bit" option of VMware Photon OS - Tech Preview 2 and click the "Continue" button.
33
-
34
-![](https://cloud.githubusercontent.com/assets/11306358/9573917/4fce6430-4f76-11e5-9a76-6cb99f5badfb.png)
35
- 
36
-Before vCloud Air can create your Photon OS VM, you need to confirm the hardware configuration. The defaults presented are the recommended values; adjust as necessary to accommodate the container workloads that you expect to run in this Photon OS instance. Once you're satisfied with the hardware configuration, click "Create Virtual Machine" Once complete, you should see your powered-on Photon OS instance ready to start the Docker engine and run a container workload.
37
- 
38
-# Installing a Containerized Application to Help Demonstrate Capability
39
-Now that you have your container runtime environment up and running, you may be wondering, “what can I do now?” A command prompt is not the most exciting!  To help to demonstrate the ease in which you can deploy a containerized application, we will showcase how you can quickly get a Web Server up and running.
40
-
41
-For this example, we will use the popular open source Web Server Nginx. The Nginx application has a customized VMware package and published as a dockerfile and can be downloaded, directly, through the Docker module from the Docker Hub.
42
-
43
-To run Docker from the command prompt, enter the command below to initialize the Docker engine:
44
-
45
-`systemctl start docker`
46
-
47
-To ensure Docker daemon service runs on every subsequent VM reboot, enter:
48
-
49
-`systemctl enable docker`
50
-
51
-Now the Docker daemon service is running, you're almost ready to “pull” and start the Nginx Web Server container from Docker Hub.  First, you'll need to ensure that you've configured your vCloud Air VM to be connected to the Internet by following the instructions found, [here](http://vcloud.vmware.com/using-vcloud-air/tutorials/connecting-a-virtual-machine-to-recieve-data-from-the-internet).  Once your Photon OS VM is connected to the Internet, the Docker engine can pull images from the Docker hub; to pull down the VMware-modified nginx container, type the following command:
52
-
53
-`docker run -d -p 80:80 vmwarecna/nginx`
54
-
55
-This will then pull the Nginx Web Server files and appropriate dependent containers to ensure this containerized application can run.  You will see a screenshot similar to below, as the container and dependencies are downloaded and the container is prepared to run:
56
- 
57
-Once “docker run” process is completed, you will be returned to the command prompt.  You now have a fully active website up and running through typing just a single command within Photon OS using containers.
58
-
59
-To test that your Web Server is active, we need to get the IP address of the Photon OS Virtual Machine. To get the IP address, enter the following command 'ifconfig'. This command will display a list of network adapters connected to the virtual machine.  Typically, the web server daemon will be bound on “eth0;” record the IP address associated with eth0. Alternatively, visit the network tab of the status page of your Photon OS instance where the IP address is listed under “Virtual Machine IP."
60
- 
61
-Start a browser on your host machine and enter the IP address of your Photon OS Virtual Machine.  The following screen should appear and that will show that your web server is active:
62
- 
63
-You can now run any other containerized application from Docker Hub or your own containerized application within Photon OS.
64
-
65
-We hope you enjoy using Photon OS as much as we enjoy creating it!
66
-
67 1
deleted file mode 100644
... ...
@@ -1 +0,0 @@
1
-If you upgrade the Photon OS Linux kernel with `tdnf upgrade linux`, you must modify the `/boot/grub2/grub.cfg` file to reflect the correct kernel version so that it works with AWS and GCE images. For example, if you install Photon OS 1.0 with kernel 4.4.8 and then upgrade the Linux kernel to 4.4.26, you must edit the /boot/grub2/grub.cfg file to replace the line containing `linux /boot/vmlinuz-4.4.8` with `linux /boot/vmlinuz-4.4.26`.
2 1
\ No newline at end of file
3 2
deleted file mode 100644
... ...
@@ -1,23 +0,0 @@
1
-You can upgrade your existing Photon OS 1.0 VMs to take advantage of security and functionality enhancements in Photon OS 2.0. For details, see [What is New in Photon OS 2.0](https://github.com/vmware/photon/wiki/What-is-New-in-Photon-OS-2.0).
2
-
3
-Photon OS 2.0 provides a seamless, in-place upgrade path for Photon OS 1.0 implementations. You simply download an upgrade package, run a script, and reboot the VM. The upgrade script will update your packages and retain your 1.0 customizations in your new OS 2.0 VM.
4
-
5
-**Note:** If your 1.0 VM is a full install, then you will have a 2.0 VM that represents a full install (all packages and dependencies). Upgrading a minimal installation takes less time due to fewer packages.
6
-
7
-For each Photon OS 1.0 VM that you want to upgrade, complete the following steps:
8
-
9
-1. Back up all existing settings and data for the Photon OS 1.0 VM.
10
-
11
-2. Stop any services (for example, docker) that are currently running in the VM.
12
-
13
-3. Download the upgrade package. From the Photon OS 1.0 command line, run the following command:
14
-~~~~
15
-    # tdnf install photon-upgrade
16
-~~~~    
17
-4. Run the upgrade script (photon-upgrade.sh), which upgrades packages and dependencies. Answer Y to any questions.
18
-~~~~
19
-    # photon-upgrade.sh
20
-~~~~
21
-5. Answer Y to reboot the VM. The upgrade script powers down the Photon OS 1.0 VM and powers it on as a Photon OS 2.0 VM.
22
-
23
-After upgrading but before you deploy into production, test all previous functionality to ensure that everything works as expected.
24 1
\ No newline at end of file
25 2
deleted file mode 100644
... ...
@@ -1,24 +0,0 @@
1
-Photon OS 2.0 introduces new security and OS management capabilities, along with new and updated packages for Cloud native applications and VMware appliances. This topic summarizes what&#39;s new and different in Photon OS 2.0.
2
-
3
-## Security Enhancements
4
-
5
-- Security-hardened Linux kernel: In addition to the linux and linux-esx kernels, Photon OS 2.0 provides a new security-hardened kernel (linux-secure), which is configured according to the recommendations of the Kernel Self-Protection Project (KSPP), plus includes most of the Pax patches.
6
-- Secure EFI boot: The operating system now boots with validated trust.
7
-- Python 3 (Python 2 is deprecated)
8
-
9
-## OS and Storage Management Enhancements
10
-
11
-- The Network Configuration Manager provides a library of C, Python, and CLI APIs that simplify common configuration tasks for network resources, including network interfaces, IP addresses, routes, DNS servers and domains, DHCP DUID and IAID, NTP servers, and other service management operations.
12
-- The Photon Management Daemon (PMD) provides the remote management of a Photon instance via a command line client (pmd-cli), Python, and REST API interfaces. The PMD provides the ability to manage network interfaces,  packages, firewalls, users, and user groups.
13
-- Project Lightwave integration: The open source security platform from VMware authenticates and authorizes users and groups with AD or LDAP.
14
-- Support for persistent volumes to store the data of cloud-native apps on VMware vSAN
15
-- Update notification
16
-- Guestinfo for cloud-init
17
-
18
-## Package and Binary Maintenance
19
-
20
-- Cloud-ready images for rapid deployment on Microsoft Azure (new), Google Compute Engine (GCE), Amazon Elastic Compute Cloud (EC2), and VMware products (vSphere, Fusion, and Workstation)
21
-- New Linux OSS packages
22
-- New packages, including Calico, Heapster, nginx-ingress, RabbitMQ, and the proxy for Wavefront by VMware
23
-- Updates to key packages, including the LTS version of the Linux kernel (4.9) and systemd
24
-- Support for multiple Java versions
25 1
deleted file mode 100644
... ...
@@ -1,31 +0,0 @@
1
--   [Home](/vmware/photon/wiki)
2
--   [Download Photon OS](https://github.com/vmware/photon/wiki/Downloading-Photon-OS)
3
--   [FAQ](https://github.com/vmware/photon/wiki/Frequently-Asked-Questions)
4
--   Getting Started Guides
5
-    -   [Quick Start](https://github.com/vmware/photon/blob/master/docs/photon-admin-guide.md#quick-start)
6
-    -   [Running Photon OS on vSphere](https://github.com/vmware/photon/wiki/Running-Photon-OS-on-vSphere)
7
-    -   [Running Photon OS on Fusion](https://github.com/vmware/photon/wiki/Running-Project-Photon-on-Fusion)
8
-    -   [Running Photon OS on Workstation](https://github.com/vmware/photon/wiki/Running-Photon-OS-on-Workstation)
9
-    -   [Running Photon OS on AWS EC2](https://github.com/vmware/photon/wiki/Running-Photon-OS-on-Amazon-Elastic-Cloud-Compute)
10
-    -   [Running Photon OS on Microsoft Azure](https://github.com/vmware/photon/wiki/Running-Photon-OS-on-Microsoft-Azure)
11
-    -   [Running Photon OS on Google Compute Engine](https://github.com/vmware/photon/wiki/Running-Photon-OS-on-Google-Compute-Engine)
12
--   Guides
13
-    -   [Installation and Administration Guide](https://github.com/vmware/photon/blob/master/docs/photon-admin-guide.md)
14
-    -   [Troubleshooting Guide](https://github.com/vmware/photon/blob/master/docs/photon-os-troubleshooting-guide.md)
15
-    -   [Photon RPM OSTree](https://github.com/vmware/photon/wiki/Photon-RPM-OSTree:-a-simple-guide)
16
--   How-To Articles
17
-    -   [Setting Up a Swarm Cluster with DNS](https://github.com/vmware/photon/wiki/Install-and-Configure-a-Swarm-Cluster-with-DNS-Service-on-PhotonOS)
18
-    -   [Setting Up a Mesos Cluster](https://github.com/vmware/photon/wiki/Install-and-Configure-a-Production-Ready-Mesos-Cluster-on-Photon-OS)
19
-    -   [Setting Up Marathon for a Mesos Cluster](https://github.com/vmware/photon/wiki/Install-and-Configure-Marathon-for-Mesos-Cluster-on-PhotonOS)
20
-    -   [Setting Up DCOS CLI for Mesos](https://github.com/vmware/photon/wiki/Install-and-Configure-DCOS-CLI-for-Mesos)
21
-    -   [Setting Up Mesos DNS on a Mesos Cluster](https://github.com/vmware/photon/wiki/Install-and-Configure-Mesos-DNS-on-a-Mesos-Cluster)
22
-    -   [Setting Up a Network PXE Boot Server](https://github.com/vmware/photon/blob/master/docs/PXE-boot.md)
23
-    -   [Working with Kickstart](https://github.com/vmware/photon/blob/master/docs/kickstart.md)
24
-    -   [Running Kubernetes](https://github.com/vmware/photon/blob/master/docs/kubernetes.md)
25
-    -   [Mounting Remote File Systems](https://github.com/vmware/photon/blob/master/docs/nfs-utils.md)
26
-    -   [Building Photon OS from the Source Code](https://github.com/vmware/photon/blob/master/docs/build-photon.md) 
27
-    -   [Installing and Using Lightwave on Photon OS](https://github.com/vmware/photon/wiki/Installing-and-Using-Lightwave-on-Photon-OS)
28
--   Security
29
-    -   [Security Advisories](https://github.com/vmware/photon/wiki/Security-Advisories)
30
--   Related
31
-    -   [Lightwave](https://github.com/vmware/lightwave)