Last active
August 17, 2016 23:25
-
-
Save eparis/69eece14dc801deac04559117c484d76 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I didn't even try CDK. It was just too aweful. I used `oc cluster up`. I'm a Linux guy with a Linux VM. I don't want to run some poor mans virt inside my VM. If my linux host was on GCE or AWS I couldn't. Thank god all of the CDK can be mostly scrapped with `oc cluster up`. | |
I had a clean F24 minimal VM | |
I built origin on another machine | |
I scp'd just oc to the VM | |
oc cluster up failed with a very good error message (docker was not running) | |
resolved with: | |
dnf install -y docker | |
systemctl start docker | |
systemtl enable docker | |
oc cluster up failed because I did not configure docker correctly | |
resolved with: | |
edit /etc/sysconfig/docker - add what oc cluster up told me to do | |
systemctl restart docker | |
oc cluster up eventually completed and told me how to access the web ui | |
I was unable to access the web UI | |
resolved with: | |
firewall-cmd --zone=public --add-port=8443/tcp --permanent | |
firewall-cmd --reload | |
oc cluster up has a different default user (developer) than the CDK (apparently openshift-dev/devel) | |
I used the web console to create a new project called `helloworld-msa` | |
we'll see what I broke by not doing things on the command line | |
Decide to look at Ansible. It says to make sure things are installed. But these names do not make it easy: | |
git, ansible, and maven can be passed to dnf install, great | |
"jdk" is not a package (although it does get picked up by the maven install) | |
In Fedora you can't install npm with some terrible error message | |
# dnf install npm | |
Last metadata expiration check: 0:22:22 ago on Wed Aug 17 18:02:14 2016. | |
Error: package npm-3.5.4-5.fc24.noarch requires nodejs(engine), but none of the providers can be installed | |
But `dnf install nodejs` gets one an npm binary, so hopefully that's enough? | |
First, edit the vars.yaml file to define the 'workdir' variable and set the absolute path where you want to "git checkout" the source code of the microservices. | |
I don't even know what this means, is it supposed to be related to where I already did a git clone? I just uncommented the variable. | |
I changed 'openshift' since `oc cluster up` is running on my node, not some hard coded IP in a VM | |
The 'domain' I have no idea about... but I changed it's ip as well (same as 'openshift') | |
`ansible-playbook helloworld-msa.yml` failed because I didn't have `oc` in my path | |
sudo cp oc /usr/bin/ | |
`Verify oc version` hard codes a check for `oc v3.2` - So this breaks in origin and will break when we release 3.3 | |
Now the user came back to bite me. Ansible hard coded stuff. The mapping from CDK->`oc cluster up` | |
openshift-dev/devel -> developer/developer | |
I've left admin/admin but I think that's going to bite eventually | |
admin/admin -> system:admin/??? | |
Actually OC cluster up left me with a busted cluster :-( No registry | |
cesar wong flushed the iptables rules and restarted the clsuter, registry came up | |
he blamed https://github.com/openshift/origin/issues/10139 (unresolved at this time) | |
I note that these are all using the `docker` build strategy. The one strategy we call unsafe and don't allow online. | |
Now one of the builds fails (bonjour-1): | |
``` | |
Step 1 : RUN npm install | |
---> Running in a05dbc042896 | |
npm info it worked if it ends with ok | |
npm info using [email protected] | |
npm info using [email protected] | |
npm ERR! Linux 4.6.5-300.fc24.x86_64 | |
npm ERR! argv "/usr/local/bin/node" "/opt/app-root/src/.npm-global/bin/npm" "install" | |
npm ERR! node v6.4.0 | |
npm ERR! npm v3.10.6 | |
npm ERR! path /opt/app-root/src/node_modules/.staging | |
npm ERR! code EACCES | |
npm ERR! errno -13 | |
npm ERR! syscall mkdir | |
npm ERR! Error: EACCES: permission denied, mkdir '/opt/app-root/src/node_modules/.staging' | |
npm ERR! at Error (native) | |
npm ERR! { Error: EACCES: permission denied, mkdir '/opt/app-root/src/node_modules/.staging' | |
npm ERR! at Error (native) | |
npm ERR! errno: -13, | |
npm ERR! code: 'EACCES', | |
npm ERR! syscall: 'mkdir', | |
npm ERR! path: '/opt/app-root/src/node_modules/.staging' } | |
npm ERR! | |
npm ERR! Please try running this command again as root/Administrator. | |
npm ERR! Please include the following file with any support request: | |
npm ERR! /opt/app-root/src/npm-debug.log | |
error: build error: The command '/bin/sh -c npm install' returned a non-zero code: 243 | |
``` | |
No clue, I'm going to cheat off someone else's gist. | |
And no one else had this problem. | |
I'm stuck for this night. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment