This is how I configured the deploy of my rails apps to AWS Elastic Beanstalk through CircleCI 1.0.
If you are using the Circle CI 2.0, take a look at this article from ryansimms
On Project Settings > Environment Variables add this keys:
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
The aws user must have the right permissions. This can be hard, maybe, this can help you.
I am deploying with this IAM using Codeship and Circle CI to Elastic Beanstalk. I had a lot of trouble with this config. I talked to the aws support for about 6 hours until this worked properly, so, I guess it is worth to share.
UPDATE: In the end, I have to use the AWSElasticBeanstalkFullAccess
policy. My custom policy keep breaking every week with some new added permission or some EB internal change. Anyway, the IAM I was using is below.
This works for me with CircleCI and EB Cli.
{
"Version": "2012-10-17",
"Statement": [
{
server { | |
root /var/www/example.com/static; | |
server_name example.com; | |
access_log /var/log/nginx/example.com.access.log; | |
error_log /var/log/nginx/example.com.error.log; | |
try_files /maintenance.html @proxy; | |
location @proxy { | |
proxy_pass http://127.0.0.1:10001; |
This post is also on my blog, since Gist doesn't support @ notifications.
Components are taking center stage in Ember 2.0. Here are some things you can do today to make the transition as smooth as possible:
- Use Ember CLI
- In general, replace views + controllers with components
- Only use controllers at the top-level for receiving data from the route, and use
Ember.Controller
instead ofEmber.ArrayController
orEmber.ObjectController
- Fetch data in your route, and set it as normal properties on your top-level controller. Export an
Ember.Controller
, otherwise a proxy will be generated. You can use Ember.RSVP.hash to simulate setting normal props on your controller.
On Nov 15 2022 @cszatmary DM'd me about a flaky test he was having trouble with.
I don't want to get too in the weeds here about the specific problem or the challenges of our codebase, but if you would like a tl;dr of the actual issue we encountered, click show gory details
below:
Click here to show gory details
- A brand new Supertest test would sometimes time out after 60 seconds, but only on CircleCI Turning gzip compression off would make the tests pass reliably, this turned out to be a red herring
import { graphql, GraphQLString, GraphQLInt } from 'graphql'; | |
import { objectType, enumType, schemaFrom, listOf } from 'graphql-schema'; | |
import request from 'promisingagent'; | |
const repositorySortEnum = enumType('RepositorySort') | |
.value('CREATED', 'created') | |
.value('UPDATED', 'updated') | |
.value('PUSHED', 'pushed') | |
.value('FULL_NAME', 'full_name') | |
.end(); |
import { Component } from "react"; | |
import { print } from "graphql-tag/printer"; | |
import { graphql } from "react-apollo"; | |
import { MockedProvider } from "react-apollo/test-utils"; | |
import { addTypenameToDocument } from "apollo-client/queries/queryTransform"; | |
import { mount } from "enzyme"; | |
import { withSavedPayments, SAVED_ACCTS_QUERY } from "../"; |
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
config.vm.box = "precise64" | |
config.vm.box_url = "http://files.vagrantup.com/precise64.box" | |
config.vm.network :private_network, ip: "192.168.33.10" | |
config.ssh.forward_agent = true |
# Other settings have been omitted, the below changes are relevant | |
machine: | |
pre: | |
- sudo service postgresql stop | |
- sudo apt-get purge -y postgresql* | |
- sudo apt-get update | |
- sudo apt-get install postgresql | |
- sudo service postgresql start | |
- sudo su - postgres -c "echo \"create user ubuntu with password 'ubuntu';\" | psql" | |
- sudo su - postgres -c "echo \"alter user ubuntu with superuser;\" | psql" |