GithubHelp home page GithubHelp logo

cloudfoundry-community / gogs-boshrelease Goto Github PK

View Code? Open in Web Editor NEW

This project forked from idoru/gogs-boshrelease

5.0 32.0 5.0 205 KB

Gogs is a painless self-hosted Git service

Home Page: https://gogs.io/

License: Apache License 2.0

Ruby 1.03% Shell 93.41% HTML 5.56%
git bosh-release gogs bosh

gogs-boshrelease's Introduction

Deploy Gogs to BOSH

One of the fastest ways to get gogs running on any infrastructure is to deploy this bosh release.

Usage

To upload and deploy this BOSH release, run bosh deploy manifests/gogs.yml and include some optional operator files.

For example, if you are running cfdev you can target it and deploy gogs:

cf dev start
source <(cf dev bosh env)

git clone https://github.com/cloudfoundry-community/gogs-boshrelease.git
bosh -d gogs deploy gogs-boshrelease/manifests/gogs.yml \
  -o gogs-boshrelease/manifests/operators/routing.yml \
  -v routing-nats-deployment=cf \
  -v gogs-uri=gogs.v3.pcfdev.io \
  --vars-store creds.yml

open https://gogs.v3.pcfdev.io/user/sign_up

Note: --vars-store creds.yml is not required if your BOSH environment is configured with Credhub.

Post Deploy Errand

To create an admin user after deploying GOGS, run the following errand.

This was moved from the gogs_ctl script to this errand as it was never executed previously

bosh -d gogs run-errand gogs-admin

Deploy with Authentication Backends

You can deploy gogs with alternative authentication backends.

The supported backend types are available on the gogs website with examples of the configuration options each have here.

Using the configuration options examples, and the operator files in manifests/operators in this repository, you can craft different backends to use.

Deploy example with operator file:

bosh -d gogs deploy gogs-boshrelease/manifests/gogs.yml \
  -o gogs-boshrelease/manifests/operators/ldap-auth.yml \
  -v gogs-uri=gogs.v3.pcf.dev.io \
  --vars-store creds.yml

It is possible to specify multiple backends of the same type, see manifests/operators/ldap-auth-multiple.yml for an example.

gogs-boshrelease's People

Contributors

drnic avatar dyroberts avatar hsiliev avatar lnguyen avatar norman-abramovitz avatar ntdt avatar shreddedbacon avatar starkandwayne-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gogs-boshrelease's Issues

proxy setting / offline build

Instructions unclear on how to set a proxy. Internet access needed during installation.

Offline build is also not available.

No admin user is created

The gogs admin create-user command is never run since the preceding command gogs web blocks the script.

Error creating repositories

Hello, I just deployed gogs using this bosh release on an OpenStack environment. Things appeared to work initially and I was able to complete the setup phase. Creating users and configuring works well but when I tried to create a repository I received the following error:

2015/02/26 20:02:24 ESC[1;36m[T] action.NewRepoAction: devcamcar/test2ESC[0m
[Macaron] ESC[1;36mCompleted /repo/create 500 Internal Server Error in 81.375203msESC[0m
2015/02/26 20:02:24 ESC[1;31m[repo.go:128 CreatePost()] [E] CreatePost: initRepository: git push: remote: /usr/bin/env: bash: No such file or directory
remote: error: hook declined to update refs/heads/master
To /var/vcap/store/gogs/repositories/devcamcar/test2.git
 ! [remote rejected] master -> master (hook declined)
error: failed to push some refs to '/var/vcap/store/gogs/repositories/devcamcar/test2.git'
ESC[0m

Any suggestions?

gogs fails to create a mirror repo due to git client packaging

Steps to reproduce:

  • deploy gogs using this bosh release
  • use the following shell script (substituting placeholders) to create a repo on gogs that mirrors another repo elsewhere. depends on jq.
#!/bin/sh

set -ex

export GOGS_ADMIN_USER=<admin username>
export GOGS_ADMIN_UID=1
export GOGS_ADMIN_PASSWORD=<admin password>
export GOGS_HOST=<gogs hostname>
export GOGS_PORT=<gogs api port>

export REMOTE_REPO_URL=https://github.com/habuma/myapp-config
export MIRROR_REPO_NAME=config-mirror-3

# export GOGS_TOKEN=`cat token-response.json | jq --raw-output '.sha1'`
export GOGS_TOKEN=`curl $GOGS_HOST:$GOGS_PORT/api/v1/users/$GOGS_ADMIN_USER/tokens -H"Content-type: application/json" -d'{"name":"admintoken"}' -u$GOGS_ADMIN_USER:$GOGS_ADMIN_PASSWORD | jq --raw-output '.sha1'`
echo $GOGS_TOKEN

export GOGS_ADMIN_UID=`curl "$GOGS_HOST:$GOGS_PORT/api/v1/user" -H"Authorization: token $GOGS_TOKEN" | jq --raw-output '.id'`
export CREATE_MIRROR_JSON="{\"clone_addr\": \"$REMOTE_REPO_URL\",\"uid\": $GOGS_ADMIN_UID,\"repo_name\": \"$MIRROR_REPO_NAME\",\"mirror\": true}"

curl "$GOGS_HOST:$GOGS_PORT/api/v1/repos/migrate" -d"$CREATE_MIRROR_JSON" -H"Content-type: application/json" -H"Authorization: token $GOGS_TOKEN"

Expected behaviour: mirror repo created on gogs called config-mirror-3
Actual behaviour: final curl call to gogs api returns the following error
{"message":"Clone: exit status 128 - fatal: Unable to find remote helper for 'https'\n","url":"https://github.com/gogs/go-gogs-client/wiki"}

It seems this has something to do with the curl installed by apt-get in the git package script.
My understanding is that it would be best not to rely on apt-get in a bosh package script anyway as it's not portable.
PR to follow!

No initial setup presented; no default password in README

I have spun up a gogs instance using the few lines of instructions from the README.md (cheers, BTW, on the brevity, given the expected functionality in return). The instance looks like its working, but when I hit the box on 8080, I am presented with a standard login screen, which expects (apparently) pre-established credentials. I am not given the opportunity, as per the gogs documentation, to create an admin account. The README.md, in its beloved brevity, is unfortunately silent on this matter.

I have attempted to logni as 'gogs' and 'admin' using 'gogs', 'admin', 'password', and the gogs-password created in the vars-store specified on the bosh command line.

Any thoughts?

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.