devops-test

command module
v0.0.0-...-bbfe430 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2019 License: MIT Imports: 5 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Playneta DevOps test task

Prerequisites

  • Golang 1.12
  • PostgreSQL

Building

mkdir /tmp/devops
cd /tmp/devops
git clone git@github.com:playneta/devops-test.git .
go build .

Migration

psql -U postgres -d db -a -f migrations/init.sql

Help

Usage of main:
  -db string
        database db (default "devops")
  -db-addr string
        database address (default "127.0.0.1:5432")
  -db-password string
        database password (default "password")
  -db-user string
        database username (default "postgres")
  -host string
        listening host (default "127.0.0.1")
  -port string
        listening port (default "12345")

Checking

curl http://localhost:12345/users
> [{"id":1,"name":"Pavel Makarenko","email":"p.makarenko@playneta.gg"},{"id":2,"name":"Maksim Moskalik","email":"m.moskalik@playneta.gg"},{"id":3,"name":"Sergey Fugin","email":"s.fugin@playneta.gg"}]

Task

  • Create Dockerfile for building Golang application
  • Create Ansible role for building container
  • Create Ansible role for running migration
  • Create Ansible role for deploying container
  • Create Ansible playbooks for: deploy, migrate

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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