tack icon indicating copy to clipboard operation
tack copied to clipboard

make all fails

Open aeftimia opened this issue 8 years ago • 6 comments

If I just clone the git repo and run make all, I get the following error. I may be new at this, but this at the very least should point to some incompleteness in the Readme file which would have pointed me to the resource needed to fill my knowledge gaps.

Error applying plan:

1 error(s) occurred:

  • module.s3.aws_s3_bucket.pki: 1 error(s) occurred:

  • aws_s3_bucket.pki: Error creating S3 bucket: BucketAlreadyOwnedByYou: Your previous request to create the named bucket succeeded and you already own it. status code: 409, request id: FCFE75F95FEFE173, host id: nvIosND/19mGDz/Dj9quII+0CfgbqXNgoIg1wsQ4y37EbyyN/TnfOREZQazNnmwGWhOvaBbBDDg=

Terraform does not automatically rollback in the face of errors. Instead, your Terraform state file has been partially updated with any resources that successfully completed. Please address the error above and apply again to incrementally change your infrastructure.

aeftimia avatar Aug 30 '17 13:08 aeftimia

is it the first time that you run make all? If not run make clean and make all or change the cluster name.

yagonobre avatar Aug 30 '17 13:08 yagonobre

I tried make clean and make all and got the same error. Then I tried export CLUSTER_NAME=k8s and got this error:

Failed to parse input: unexpected end of JSON input

  • finish
  • '[' -z 6194 ']'
  • kill 6194 ✗ create admin certificate - FAIL

make[2]: *** [create-admin-certificate] Error 1 make[1]: *** [post-terraform] Error 2 make: *** [all] Error 2

Maybe I should just ask this:

What is the bare minimum information I need to specify and change to get a sample working that I can start to tinker with?

On Aug 30, 2017, at 09:47, Yago Nobre [email protected] wrote:

It is the first time that you run make all? If not run make clean and make all or change the cluster name.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/kz8s/tack/issues/207#issuecomment-325995546, or mute the thread https://github.com/notifications/unsubscribe-auth/AEa73qyhYSwk7h9-2aLjNV4-AmVMd-W7ks5sdWgLgaJpZM4PHaMC.

aeftimia avatar Aug 30 '17 14:08 aeftimia

You no need to edit anything, check in s3 if you have a bucket named ${AWS_ACCOUNT_ID}-${CLUSTER_NAME}-${AWS_REGION} and delete this

yagonobre avatar Aug 30 '17 14:08 yagonobre

I deleted all buckets, but terraform had a lock on it. I tried make clean, and terraform destroy, then deleting the the tfstate file and again deleted s3 buckets. This time I get the following error:

003e"} Failed to parse input: unexpected end of JSON input

  • finish
  • '[' -z 16794 ']'
  • kill 16794 ✗ create admin certificate - FAIL

make[2]: *** [create-admin-certificate] Error 1 make[1]: *** [post-terraform] Error 2 make: *** [all] Error 2

I’m guessing if it couldn’t make an admin certificate, the user does not have proper permissions to do so.

On Aug 30, 2017, at 10:34, Yago Nobre [email protected] wrote:

You no need to edit anything, check in s3 if you have a bucket named ${AWS_ACCOUNT_ID}-${CLUSTER_NAME}-${AWS_REGION} and delete this

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/kz8s/tack/issues/207#issuecomment-326009939, or mute the thread https://github.com/notifications/unsubscribe-auth/AEa73oPqfeleI4u8aO7im2_FqMc4T7Wbks5sdXLogaJpZM4PHaMC.

aeftimia avatar Aug 30 '17 18:08 aeftimia

I'm also having some issues in the create admin cert function, everything else seems to be going well here is some output

❤ create admin certificate
+ echo .cfssl
.cfssl
+ echo WildCat
WildCat
+ echo .keypair/kz8s-Wild.pem
.keypair/kz8s-WildCat.pem
++ terraform output bastion-ip
+ BASTION_IP=XX.XX.XX.XX
+ trap 'error ${LINENO}' ERR
+ ssh-keyscan 

+ trap finish EXIT
+ printf .
.+ curl -d '{"label":"primary"}' http://localhost:8888/api/v1/cfssl/info
+ ssh -o StrictHostKeyChecking=no -i .keypair/kz8s-Wild.pem -nNT -L 8888:pki.Wild.kz8s:8888 [email protected]
+ sleep 2.5
+ printf .
.+ curl -d '{"label":"primary"}' http://localhost:8888/api/v1/cfssl/info
+ echo ✓
✓
+ mkdir -p .cfssl
+ cd .cfssl
+ generate k8s-admin client
+ CN=k8s-admin
+ PROFILE=client
+ cfssl gencert -remote=localhost:8888 -profile=client -
+ cfssljson -bare k8s-admin
++ csr k8s-admin
++ cat
scripts/create-admin-certificate: line 47: cfssljson: command not found
+ echo '{"CN":"k8s-admin","hosts":[""],"key":{"algo":"rsa","size":2048}}'
Must specify bundle target through -cert or -domain
+ finish
+ '[' -z 25664 ']'
+ kill 25664
✗ create admin certificate - FAIL

Makefile:108: recipe for target 'create-admin-certificate' failed
make[1]: *** [create-admin-certificate] Error 127
make[1]: Leaving directory '/home/zack/tack'
Makefile:65: recipe for target 'post-terraform' failed
make: *** [post-terraform] Error 2

zacbayhan avatar Nov 18 '17 02:11 zacbayhan

@zacbayhan I just encountered that same issue. If you look at the error, you will see this line

scripts/create-admin-certificate: line 47: cfssljson: command not found

I went and installed cfssljson with this and it worked

https://github.com/cloudflare/cfssl

go get -u github.com/cloudflare/cfssl/cmd/cfssljson

eanderson4 avatar Jan 22 '18 19:01 eanderson4