server

package module
Version: v0.0.0-...-e5018cc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 10, 2021 License: MIT Imports: 4 Imported by: 0

README

GoDocGo Report Card

How can I use server?

PLEASE NOTE: this package was build for yum-based linux distributions and was tested on RHEL and CentOS 7 operating systems. I do plan on extending the package to Debian-based systems in the future. Please feel free to add the functionality!

IN ADDITION: you will need to run the program from an account with elevated privileges, i.e., able to run sudo commands. Do not run from the root account.

  1. Install git

    sudo yum install git -y

  2. Install Go

    Follow the installation steps on the Go download and install site.

     1. Download the archive and extract it into /usr/local, creating a Go tree in /usr/local/go. For example, run the following as root or through sudo:
    
     tar -C /usr/local -xzf *.tar.gz
    
     2. Add /usr/local/go/bin to the PATH environment variable.
    
     You can do this by adding the following line to your $HOME/.profile or /etc/profile (for a system-wide installation):
    
     export PATH=$PATH:/usr/local/go/bin
    
     Note: Changes made to a profile file may not apply until the next time you log into your computer. To apply the changes immediately, just run the shell commands directly or execute them from the profile using a command such as source $HOME/.profile.
    
     3. Verify that you've installed Go by opening a command prompt and typing the following command:
    
     $ go version
    
     Confirm that the command prints the installed version of Go.
    
  3. Then clone the repo into your $HOME directory

    git clone https://github.com/rkbright/server.git

    Or you can import using go

    go get github.com/rkbright/server

    the above will install the package in:

    $GOPATH/go/src/github.com/rkbright/server

  4. Change directories

    cd server

    or

    cd github.com/rkbright/server

    Then run the program go run cmd/main.go

That's it! It takes a few minutes to run yum update and download the dependencies, especially for ephemeral VMs that are newly provisioned. So feel free to grab a cup of your favorite beverage.

What is server?

server is a Go package that automates the build process to support Jekyll-based static websites.

What will be installed?

  • ruby version 2.7 (you can update the version in the server.go file)
  • jekyll
  • bundler
  • gem
  • apache
  • lets encrypt

What is Jekyll?

Jekyll is a simple, blog-aware, static site generator for personal, project, or organization sites.

GoDoc

Link to GoDoc page

Other Resources

I know of only one other repo that tries to automate the Jekyll install

Parker Moore: https://github.com/parkr/jekyll-build-server

Documentation

Overview

Package server automates the installation of the Jekyll static website generator

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Runner

type Runner struct {
	History      []string
	Output       string
	Error        error
	GetRbenv     string
	SetBashrc    string
	InstallRbenv string
	// contains filtered or unexported fields
}

Runner is a runner object with exportable and nonexportable names

func NewRunner

func NewRunner() *Runner

NewRunner returns a reference to Runner

func NewTestRunner

func NewTestRunner() *Runner

NewTestRunner returns an instance of Runner for testing

func (*Runner) Command

func (r *Runner) Command(command string, args ...string) error

Command reads from runner and takes one or more commandline arguments

func (*Runner) EnsureRbenvInstalled

func (r *Runner) EnsureRbenvInstalled() error

EnsureRbenvInstalled reads from runner and installs dependencies

func (*Runner) EnsureYumUpdated

func (r *Runner) EnsureYumUpdated() error

EnsureYumUpdated updates yum packages

func (*Runner) InstallGem

func (r *Runner) InstallGem(p string) error

InstallGem reads from runner, checks if dependencies are installed, and completes the install of jekyll and bundler

func (*Runner) InstallPackage

func (r *Runner) InstallPackage(p string) error

InstallPackage reads from runner and installs dependency packages

Source Files

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL