GithubHelp home page GithubHelp logo

austincunningham / change_oc Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 2.0 25.39 MB

A command line tool for downloading and switching between oc binarys

Home Page: http://change-oc.ddns.net

License: Apache License 2.0

JavaScript 82.14% HTML 16.43% CSS 1.43%
binary cli command-line-tool oc

change_oc's Introduction

Personal Blogs

Stats

Austin's github stats

Top Languages

Top Langs

Languages

Dev Ops

CI/CD

Frameworks

DB

change_oc's People

Contributors

austincunningham avatar dependabot[bot] avatar lydiacunningham avatar

Stargazers

 avatar

Watchers

 avatar

change_oc's Issues

wrong version show at the end of script run when file is extracted but not changed to

Request finished writing to file
================================= Extract OC =======================================
download version: 3.9
Extract completed
File extracted
[Function: change]
================================= Change OC ========================================
What version of oc do you wish to switch to ?

  • 3.7
  • 3.9
  • 3.10
  • 3.11
    3.7
    Command-line input received:
    Change to Version : 3.7
    New Version Number : oc v3.7.2+282e43f
    kubernetes v1.7.6+a08f5eeb62
    features: Basic-Auth GSSAPI Kerberos SPNEGO

oc version changed to :3.9

Error starting cannot touch /usr/local/bin

Error on start

touch: cannot touch '/usr/bin/oc': No such file or directory
child_process.js:651
throw err;
^

Error: Command failed: sudo touch /usr/bin/oc
touch: cannot touch '/usr/bin/oc': No such file or directory

at checkExecSyncError (child_process.js:611:11)
at execSync (child_process.js:648:13)
at Object.<anonymous> (/home/austin/repo/change_oc/index.js:20:3)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:742:12)
at startup (internal/bootstrap/node.js:279:19)

Fails to start

npm start

[email protected] start /home/austin/repo/change_oc
node index.js

======================== Check for OC Version Installed =============================
The folowing versions of oc are installed at /opt/openshift

Issue when /usr/bin/oc does not exist

Getting the following error when trying to run change_oc:

======================== Check for OC Version Installed =============================
The folowing versions of oc are installed at /opt/openshift
find: ‘/usr/bin/oc’: No such file or directory
child_process.js:669
    throw err;
    ^

Error: Command failed: sudo find /usr/bin/oc -type l -delete
find: ‘/usr/bin/oc’: No such file or directory

    at checkExecSyncError (child_process.js:629:11)
    at execSync (child_process.js:666:13)
    at Object.<anonymous> (/usr/lib/node_modules/change_oc/index.js:15:3)
    at Module._compile (internal/modules/cjs/loader.js:776:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:829:12)
    at startup (internal/bootstrap/node.js:283:19)

Issue when unzipping oc tools

~ change_oc
======================== Check for OC Version Installed =============================
The folowing versions of oc are installed at /opt/openshift
Installed
oc

================================= Download OC =======================================
Do you wish to install an oc binary yes/no ? yes
What version of oc do you wish to install ? 
 - 3.7
 - 3.9
 - 3.10
 - 3.11
 - 4.1
4.1
==========                                                                          
Request finished writing to file
================================= Extract OC =======================================
download version:  4.1

gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now
child_process.js:669
    throw err;
    ^

Error: Command failed: tar --warning=no-unknown-keyword -C 4.1 -zxvf 4.1.tar.gz

gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now

    at checkExecSyncError (child_process.js:629:11)
    at execSync (child_process.js:666:13)
    at fs.exists (/usr/lib/node_modules/change_oc/src/extract.js:23:7)
    at suppressedCallback (fs.js:199:5)
    at FSReqWrap.args [as oncomplete] (fs.js:140:20)

Error installing

may be nvm related

/.nvm/versions/node/v10.11.0/lib/node_modules/change_oc: Appears to be a git repo or submodule.
npm ERR! git     /home/austin/.nvm/versions/node/v10.11.0/lib/node_modules/change_oc
npm ERR! git Refusing to remove it. Update manually,
npm ERR! git or move it out of the way first.

can't install 4.4 , 4.5, 4.6

npm start

> [email protected] start /home/austincunningham/repo/change_oc
> node index.js

======================== Check for OC Version Installed =============================
The folowing versions of oc are installed at /opt/openshift
4.1
4.2
Installed
ocm

================================= Download OC =======================================
Do you wish to install an oc binary yes/no ? y
What version of oc do you wish to install ? 
 - 3.7
 - 3.9
 - 3.10
 - 3.11
 - 4.1
 - 4.2
 - 4.3
 - 4.4
 - 4.5
 - 4.6
4.6
                                                                               ====>
internal/streams/legacy.js:57
      throw er; // Unhandled stream error in pipe.
      ^

Error: ESOCKETTIMEDOUT
    at ClientRequest.<anonymous> (/home/austincunningham/repo/change_oc/node_modules/request/request.js:816:19)
    at Object.onceWrapper (events.js:286:20)
    at ClientRequest.emit (events.js:198:13)
    at TLSSocket.emitRequestTimeout (_http_client.js:673:40)
    at Object.onceWrapper (events.js:286:20)
    at TLSSocket.emit (events.js:198:13)
    at TLSSocket.Socket._onTimeout (net.js:443:8)
    at ontimeout (timers.js:436:11)
    at tryOnTimeout (timers.js:300:5)
    at listOnTimeout (timers.js:263:5)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `node index.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/austincunningham/.npm/_logs/2021-05-26T10_45_51_578Z-debug.log

Could not install oc 4.3

I got an error trying to install oc 4.3. Note that 4.1 worked fine.

download version:  4.3
tar (child): 4.3.tar.gz: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now
child_process.js:669
    throw err;
    ^

Error: Command failed: tar --warning=no-unknown-keyword -C 4.3 -zxvf 4.3.tar.gz
tar (child): 4.3.tar.gz: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now

    at checkExecSyncError (child_process.js:630:11)
    at execSync (child_process.js:666:15)
    at /home/ephelan/.npm/_npx/250271/lib/node_modules/change_oc/src/extract.js:23:7
    at suppressedCallback (fs.js:215:5)
    at FSReqCallback.oncomplete (fs.js:156:23) {
  status: 2,
  signal: null,
  output: [
    null,
    Buffer(0) [Uint8Array] [],
    Buffer(187) [Uint8Array] [
      116,  97, 114,  32,  40,  99, 104, 105, 108, 100,  41,  58,
       32,  52,  46,  51,  46, 116,  97, 114,  46, 103, 122,  58,
       32,  67,  97, 110, 110, 111, 116,  32, 111, 112, 101, 110,
       58,  32,  78, 111,  32, 115, 117,  99, 104,  32, 102, 105,
      108, 101,  32, 111, 114,  32, 100, 105, 114, 101,  99, 116,
      111, 114, 121,  10, 116,  97, 114,  32,  40,  99, 104, 105,
      108, 100,  41,  58,  32,  69, 114, 114, 111, 114,  32, 105,
      115,  32, 110, 111, 116,  32, 114, 101,  99, 111, 118, 101,
      114,  97,  98, 108,
      ... 87 more items
    ]
  ],
  pid: 250356,
  stdout: Buffer(0) [Uint8Array] [],
  stderr: Buffer(187) [Uint8Array] [
    116,  97, 114,  32,  40,  99, 104, 105, 108, 100,  41,  58,
     32,  52,  46,  51,  46, 116,  97, 114,  46, 103, 122,  58,
     32,  67,  97, 110, 110, 111, 116,  32, 111, 112, 101, 110,
     58,  32,  78, 111,  32, 115, 117,  99, 104,  32, 102, 105,
    108, 101,  32, 111, 114,  32, 100, 105, 114, 101,  99, 116,
    111, 114, 121,  10, 116,  97, 114,  32,  40,  99, 104, 105,
    108, 100,  41,  58,  32,  69, 114, 114, 111, 114,  32, 105,
    115,  32, 110, 111, 116,  32, 114, 101,  99, 111, 118, 101,
    114,  97,  98, 108,
    ... 87 more items
  ]
}

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.