Skip to content

Commit

Permalink
doc: init
Browse files Browse the repository at this point in the history
  • Loading branch information
astro committed Feb 2, 2023
1 parent c8781c3 commit 17fb439
Show file tree
Hide file tree
Showing 8 changed files with 191 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# These are supported funding model platforms

github: ['astro']
21 changes: 21 additions & 0 deletions .github/workflows/doc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: doc

on:
push:
branches:
- main

jobs:
deploy:
name: build and deploy doc
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v17
- name: Build
run: nix build .#doc-html
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./result
20 changes: 20 additions & 0 deletions doc/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = .
BUILDDIR = _build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
37 changes: 37 additions & 0 deletions doc/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import sphinx_rtd_theme


# Configuration file for the Sphinx documentation builder.
#
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

project = 'Skyflake'
copyright = 'Astro'
author = 'Astro'

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

# source_suffix = {
# '.rst': 'restructuredtext',
# '.txt': 'restructuredtext',
# '.md': 'markdown',
# }

extensions = ['myst_parser']

templates_path = ['_templates']
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']



# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

html_theme = 'sphinx_rtd_theme'
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]

20 changes: 20 additions & 0 deletions doc/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
.. Skyflake documentation master file, created by
sphinx-quickstart on Thu Feb 2 01:03:43 2023.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to Skyflake's documentation!
====================================

.. toctree::
:maxdepth: 3
:caption: Contents:

intro


Indices and tables
==================

* :ref:`genindex`
* :ref:`search`
31 changes: 31 additions & 0 deletions doc/intro.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Introduction

## Hyperconverged Infrastructure

For a user, hyperconverged infrastructure is a platforms that runs
their machines/services on demand. That is orchestrated in real-time
instead of having somebody put a new computer into the datacenter the
next workday. The user pays not only for the variable resource usage
but also for high availability and storage redundancy.

For operators, this guide provides guidelines to prepare a deployment
that will allow to expand its capacities by simply adding more
machines.

In short, we understand Hyperconverged Infrastructure to be what
people expect in **Cloud Computing**, running on standard
off-the-shelf servers.


## Input/Output

### Persistent Storage

### Network Setup



transparent to location?
L2 or L3

## About MicroVMs
3 changes: 3 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
pkgs = nixpkgs.legacyPackages.${system};

in {
packages.${system} = import ./pkgs/doc.nix {
inherit pkgs self;
};

nixosModules = {
default = {
Expand Down
56 changes: 56 additions & 0 deletions pkgs/doc.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{ self, pkgs }:

let
version =
if self.sourceInfo ? revCounf
then with self.sourceInfo; "${revCount}-${shortRev}"
else "dirty";
inherit (self.sourceInfo) lastModified;
in

{
doc-html = pkgs.stdenv.mkDerivation rec {
name = "skyflake-doc-html-${version}";
inherit version;
src = ../doc;
buildInputs = with pkgs.python3Packages; [
sphinx
sphinx_rtd_theme
myst-parser
];
buildPhase = ''
export SOURCE_DATE_EPOCH=${toString lastModified}
make html
'';
installPhase = ''
cp -r _build/html $out
mkdir $out/nix-support
echo doc manual $out index.html >> $out/nix-support/hydra-build-products
'';
};
doc-pdf = pkgs.stdenv.mkDerivation rec {
name = "skyflake-doc-pdf-${version}";
inherit version;
src = ../doc;
buildInputs = [ (pkgs.texlive.combine {
inherit (pkgs.texlive)
scheme-basic latexmk cmap collection-fontsrecommended fncychap
titlesec tabulary varwidth framed fancyvrb float wrapfig parskip
upquote capt-of needspace etoolbox;
}) ] ++ (with pkgs.python3Packages; [
sphinx
sphinx_rtd_theme
myst-parser
]);
buildPhase = ''
export SOURCE_DATE_EPOCH=${toString lastModified}
make latexpdf
'';
installPhase = ''
mkdir $out
cp _build/latex/skyflake.pdf $out
mkdir $out/nix-support
echo doc-pdf manual $out skyflake.pdf >> $out/nix-support/hydra-build-products
'';
};
}

0 comments on commit 17fb439

Please sign in to comment.