diff --git a/FPM.ftd b/FPM.ftd index 78994fbac..eca4a34ac 100644 --- a/FPM.ftd +++ b/FPM.ftd @@ -54,6 +54,7 @@ implements: fifthtry.github.io/theme - `fpm diff`: /diff/ - `fpm update`: /update/ - `fpm serve`: /serve/ + - `fpm install`: /cli/install/ @@ -99,6 +100,7 @@ implements: fifthtry.github.io/theme - Journal: /journal/ - Contribution Guide: /dev/contribute/ - How Versioning Works: /dev/versioning/ +- FPM Controller Support: /dev/controller/ - What is `FPM.manifest.ftd`?: /dev/fpm-manifest/ - File System Organization: /fs/ - `FPM.ftd`: /fpm-ftd-file/ diff --git a/cli/install.ftd b/cli/install.ftd new file mode 100644 index 000000000..4904e3189 --- /dev/null +++ b/cli/install.ftd @@ -0,0 +1,52 @@ +-- ft.page: `fpm install` + +`fpm install` installs all the dependencies of current package. + +-- ft.h2: Synopsis + +-- ft.code: +lang: sh + +fpm install +fpm install # TODO +fpm install # TODO +fpm install # TODO +fpm install # TODO +fpm install / # TODO + +aliases: add, i, install + + +-- ft.h2: Description + +`fpm install` installs the package and any packages that it depends on. + +A `package` is: + +- a) a folder that contains `FPM.ftd` +- b) a gzipped tarball containing (a) +- c) a url that resolves to (b) +- d) a that resolves to (a) + +- `fpm install` install + + +Install the dependencies to local `.packages` folder. By default, `fpm install` +will install all packages listed as dependencies in `FPM.ftd` file. + + +- `fpm install ` + + +- `fpm install ` + +Install a package that is sitting on your file system. + +Tarball requirements: +- The filename must use .tar, .tar.gz, or .tgz as the extension. + + +- `fpm install ` + +Fetch the tarball url, and then install it. The url must start with `http://` or +`https://` \ No newline at end of file diff --git a/dev/controller.ftd b/dev/controller.ftd new file mode 100644 index 000000000..a3c4a18f5 --- /dev/null +++ b/dev/controller.ftd @@ -0,0 +1,41 @@ +-- ft.page: FPM Controller Support + +FPM cli supports communication with [fpm +controller](https://github.com/FifthTry/fpm-controller). This is an optional +feature, and is only available when `controller` feature is enabled, which is +not enabled by default. + +-- ft.h1: Controller Communication + +When `controller` feature is enabled, `fpm serve` will first communicate with +the FPM controller service's `/get-package/` API. + +-- ft.h2: FPM Controller Service Endpoint + +The FPM Controller Service's enpoint is computed by using environement +variable `FPM_CONTROLLER`, which will look something like this: +`https://controller.fifthtry.com`, with the API path. + +FPM Controller Service has more than one APIs: /get-package/ and /fpm-ready/. + +-- ft.h1: `/get-package/` + +Through an environemnt variable `FPM_INSTANCE_ID`, the `fpm serve` will learn +it's `instance id`, and it will pass the instance id to the `get-package` API. + +The API returns the URL of the package to be downloaded, git repository URL and +the package name. + +FPM will clone the git repository in the current directory. The current +directory will contain `FPM.ftd` and other files of the package. + +FPM will then calls [`fpm install`](/cli/install/) on it. + +-- ft.h1: `/fpm-ready/` + +Once dependencies are ready `fpm` calls `/fpm-ready/` API on the controller. We +will pass the `FPM_INSTANCE_ID` and the git commit hash as input to the API + +The API will return with success, and once it is done fpm will start receiving HTTP +traffic from the controller service. + diff --git a/sitemap.ftd b/sitemap.ftd index e5d5da5ce..e9191e6ca 100644 --- a/sitemap.ftd +++ b/sitemap.ftd @@ -247,8 +247,6 @@ from section, subsection and it's parent TOC. i.e. `key1: value1`, `key2: value2 `key3: value3`, `key4: value4` and `key5: value5` - - -- ft.h1: Variable can be changed based on key value data Using the `get-data`, the title can be different: @@ -273,11 +271,11 @@ lang: ftd # Overview -- foo/ +- foo: foo/ # Development -- foo/-/1 +- foo: foo/-/1 show-dev-info: true diff --git a/sync.ftd b/sync.ftd index 8b01365ad..10650e868 100644 --- a/sync.ftd +++ b/sync.ftd @@ -1,8 +1,6 @@ -- ft.page: `fpm sync` --- ft.markdown: - `fpm sync` operates in two modes. If the package is hosted on `fpm-repo` then it syncs the content of local folder with remote [not yet implemented]. If the package is hosted on `github` etc, then `sync` creates a snapshot of modified files in