Opehshift

Openshift Origin Web Console 접속정보 변경하기

L’Etranger 2017. 12. 12. 17:15

o 작업환경

   - VMWare Workstation 에 Ubuntu 16.04.03 LTS 설치했음. 

   - 해당 VM IP 는 192.168.233.128임


o 선행작업

   - VMWare Workstation 의 Ubuntu VM에 /etc/hosts 파일 내용을 변경 

     $ vi /etc/hosts

       192.168.233.128     mycloud.com

   - Host PC (Windows)의 C:\window\system3\drivers\etc\hosts 파일에 내용 반영

       192.168.233.128     mycloud.com


$ oc cluster up --help   

Starts an OpenShift cluster using Docker containers, provisioning a registry, router, initial templates, and a default

project. 


This command will attempt to use an existing connection to a Docker daemon. Before running the command, ensure that you

can execute docker commands successfully (i.e. 'docker ps'). 


Optionally, the command can create a new Docker machine for OpenShift using the VirtualBox driver when the

--create-machine argument is specified. The machine will be named 'openshift' by default. To name the machine

differently, use the --docker-machine=NAME argument. If the --docker-machine=NAME argument is specified, but

--create-machine is not, the command will attempt to find an existing docker machine with that name and start it if it's

not running. 


By default, the OpenShift cluster will be setup to use a routing suffix that ends in nip.io. This is to allow dynamic

host names to be created for routes. An alternate routing suffix can be specified using the --routing-suffix flag. 


A public hostname can also be specified for the server with the --public-hostname flag.


Usage:

  oc cluster up [options]


Examples:

  # Start OpenShift on a new docker machine named 'openshift'

  oc cluster up --create-machine

  

  # Start OpenShift using a specific public host name

  oc cluster up --public-hostname=my.address.example.com

  

  # Start OpenShift and preserve data and config between restarts

  oc cluster up --host-data-dir=/mydata --use-existing-config

  

  # Use a different set of images

  oc cluster up --image="registry.example.com/origin" --version="v1.1"

  

  # Specify which set of image streams to use

  oc cluster up --image-streams=centos7


Options:

      --create-machine=false: Create a Docker machine if one doesn't exist

      --docker-machine='': Specify the Docker machine to use

  -e, --env=[]: Specify a key-value pair for an environment variable to set on OpenShift container

      --forward-ports=false: Use Docker port-forwarding to communicate with origin container. Requires 'socat' locally.

      --host-config-dir='/var/lib/origin/openshift.local.config': Directory on Docker host for OpenShift configuration

      --host-data-dir='': Directory on Docker host for OpenShift data. If not specified, etcd data will not be persisted

on the host.

      --host-pv-dir='/var/lib/origin/openshift.local.pv': Directory on host for OpenShift persistent volumes

      --host-volumes-dir='/var/lib/origin/openshift.local.volumes': Directory on Docker host for OpenShift volumes

      --http-proxy='': HTTP proxy to use for master and builds

      --https-proxy='': HTTPS proxy to use for master and builds

      --image='openshift/origin': Specify the images to use for OpenShift

      --image-streams='centos7': Specify which image streams to use, centos7|rhel7

      --logging=false: Install logging (experimental)

      --metrics=false: Install metrics (experimental)

      --no-proxy=[]: List of hosts or subnets for which a proxy should not be used

      --public-hostname='': Public hostname for OpenShift cluster

      --routing-suffix='': Default suffix for server routes

      --server-loglevel=0: Log level for OpenShift server

      --service-catalog=false: Install service catalog (experimental).

      --skip-registry-check=false: Skip Docker daemon registry check

      --use-existing-config=false: Use existing configuration if present

      --version='': Specify the tag for OpenShift images


Use "oc options" for a list of global command-line options (applies to all commands).



$ oc cluster up --public-hostname=mycloud.com

Starting OpenShift using openshift/origin:v3.7.0 ...

OpenShift server started.


The server is accessible via web console at:

    https://mycloud.com:8443


You are logged in as:

    User:     developer

    Password: <any value>


To login as administrator:

    oc login -u system:admin