Giter VIP home page Giter VIP logo

shell-server's Introduction

#! Shell Server

https://github.com/hashbang/shell-server

About

This is the central build and management repository for #! shell servers.

It should contain everything required to run your own #! shell server, or to develop changes to be deployed to all existing deployed servers.

Existing servers automatically update from this repo via ansible-pull.

Requirements

Tool Version Needed for Builder
Ansible v2.5+ all
Packer v1.2x+ all
Docker v18.0+ Docker
qemu v2.12+ qemu, libvirt
Virtualbox v5.2+ virtualbox, vagrant
Vagrant v2.1.1+ vagrant
Linux v4.16+ lxc, libvirt
lxc v3.0+ lxc

Building

You will normally need a #! account to use these, as they authenticate users against our NSS services by default.

Docker

Build image

make docker

Import image

gunzip -c dist/docker-20*.tar.gz | docker import - hashbang/shell-server:local-latest

Start container

docker run \
  -it \
  --rm \
  --name shell-server \
  -p 8080:80 \
  -p 4443:443 \
  -p 2222:22 \
  -v /sys/fs/cgroup:/sys/fs/cgroup:ro \
  --stop-signal SIGRTMIN+3 \
  --cap-add SYS_ADMIN \
  --cap-add SYS_RESOURCE \
  --security-opt apparmor=unconfined \
  --security-opt seccomp=unconfined \
  hashbang/shell-server:local-latest \
  /lib/systemd/systemd

User shell

ssh -p2222 your-hashbang-user@localhost

Root shell

docker exec -it shell-server bash

LXC

Build image

make lxc

User shell

TODO

Root shell

TODO

Vagrant

Build Image

make vagrant

Start server

vagrant init hashbang/shell-server
vagrant up

User shell

ssh -p2222 your-hashbang-user@localhost

Root shell

vagrant ssh

Libvirt

Build Image

make qemu

Start server

virt-install \
  --name shell-server \
  --os-type linux \
  --os-variant debian9 \
  --ram 512 \
  --vcpus 2 \
  --disk path=dist/qemu-latest.qcow2 \
  --network user \
  --noautoconsole \
  --import \
  --force

User shell

virsh --connect qemu+ssh://username@shell-server/system

Root shell

TODO

Qemu

Build Image

make qemu

Start server

qemu-system-x86_64 \
  -m 512M \
  -machine type=pc,accel=kvm \
  -net nic -net user,hostfwd=tcp::2222-:22 \
  -drive format=qcow2,file=dist/qemu-latest.qcow2

User shell

TODO

Root shell

TODO

Development

Once you have root access on a development debian server be it local or remote, you can test your locally made ansible playbook changes as follows.

Run Ansible Playbook

ansible-playbook \
  -u root \
  -i "localhost," \
  -e ansible_ssh_port=2222 \
  ansible/main.yml

Deployment

Kubernetes

TODO

Amazon

TODO

DigitalOcean

TODO

Google Cloud

TODO

Azure

TODO

Bare Metal

ansible-playbook -u root -i "target-server.com," ansible/main.yml

Releasing

  1. Copy config sample and populate with your credentials as desired:

    cp config.sample.json config.json
    vim config.json
    
  2. Build, sign, and publish all image types

    make build release
    

shell-server's People

Contributors

lrvick avatar kellerfuchs avatar ryansquared avatar benharri avatar mayli avatar daurnimator avatar drgrove avatar dpflug avatar infrastation avatar mstrodl avatar valdikss avatar hashmoon avatar louskunt avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.