Giter Club home page Giter Club logo

devops-on-k8s's Introduction

devops-on-k8s

在K8S中部署DevOps工具链

Docker运行【原始】

#!/bin/bash

LOCALDIR=/data/devops

gitlab(){
  docker run  --rm -d \
    --publish 443:443 --publish 8088:8088 --publish 2222:22 \
    --name gitlab \
    --volume ${LOCALDIR}/gitlab/config:/etc/gitlab \
    --volume ${LOCALDIR}/gitlab/logs:/var/log/gitlab \
    --volume ${LOCALDIR}/gitlab/data:/var/opt/gitlab \
    gitlab/gitlab-ce:12.6.0-ce.0
}

nexus(){
  docker run -id \
    --privileged=true --name=nexus3 \
    -p 8081:8081 \
    -v ${LOCALDIR}/nexus3/nexus-data:/nexus-data \
    sonatype/nexus3:3.20.1
}



sonar(){
  docker run --rm -d --name sonarqube \
    -p 9000:9000 \
    -v ${LOCALDIR}/sonar/sonarqube_conf:/opt/sonarqube/conf \
    -v ${LOCALDIR}/sonar/sonarqube_extensions:/opt/sonarqube/extensions \
    -v ${LOCALDIR}/sonar/sonarqube_logs:/opt/sonarqube/logs \
    -v ${LOCALDIR}/sonar/sonarqube_data:/opt/sonarqube/data \
    sonarqube:7.9.2-community

}

ldap(){
    docker run -p 389:389 --name myopenldap  \
	--env LDAP_ORGANISATION="devops" --env LDAP_DOMAIN="devops.com" --env LDAP_ADMIN_PASSWORD="ldap123" --detach osixia/openldap
}


ldapadmin(){
    docker run -d --privileged -p 10004:80 --name myphpldapadmin \
         --env PHPLDAPADMIN_HTTPS=false --env PHPLDAPADMIN_LDAP_HOSTS=192.168.1.200 --detach osixia/phpldapadmin

}
case $1 in
    "gitlab")
	    gitlab
	    ;;
    "sonar")
	    sonar
	    ;;
    "ldap")
	    ldap
	    ;;
    "ldapadmin")
	    ldapadmin
	    ;;
    "nexus")
	    nexus
	    ;;
    "*")
	    ;;
esac


K8S中部署

kubectl create -f .

devops-on-k8s's People

Contributors

zeyangli avatar proccode 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.